You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrate remote debugging articles from WebPI (#10359)
* Migrate remote debugging articles from WebPI
* Web Deploy updates
* Updating VS version
* edits
* edits
* art links
* art
* tweak
* review edits
* minor edit
Copy file name to clipboardExpand all lines: docs/debugger/includes/remote-debugger-deploy-app-local.md
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,14 @@
16
16
17
17
1. In the **Publish** dialog box, select **Folder**, click **Browse**, and create a new folder, **C:\Publish**.
18
18
19
-
::: moniker range=">=vs-2019"
19
+
::: moniker range=">=vs-2022"
20
+
21
+
:::image type="content" source="../media/vs-2022/remote-debug-publish-local.png" alt-text="Screenshot of the Pick a publish target dialog in Visual Studio with the Folder `C:\Publish' selected as the publish target.":::
22
+
23
+
Click **Finish** to save the publish profile.
24
+
::: moniker-end
25
+
26
+
::: moniker range="vs-2019"
20
27
21
28
:::image type="content" source="../media/vs-2019/remotedbg-publish-local.png" alt-text="Screenshot of the Pick a publish target dialog in Visual Studio with the Folder `C:\Publish' selected as the publish target.":::
22
29
@@ -26,18 +33,15 @@
26
33
27
34
1. Switch to a debug configuration.
28
35
29
-
::: moniker range=">=vs-2019"
30
36
Choose **Edit** to edit the profile, and then choose **Settings**. Choose a **Debug** configuration, and then choose **Remove additional files at destination** under the **File Publish** options.
31
-
::: moniker-end
32
37
38
+

33
39
34
40
> [!NOTE]
35
41
> If you use a Release build, you disable debugging in the *web.config* file when you publish.
36
42
37
43
1. Click **Publish**.
38
44
39
-

40
-
41
45
The application publishes a **Debug** configuration of the project to the local folder. Progress shows in the Output window.
42
46
43
47
1. Copy the ASP.NET project directory from the Visual Studio computer to the local directory configured for the ASP.NET app (in this example, **C:\Publish**) on the Windows Server computer. In this tutorial, we assume you are copying manually, but you can use other tools like PowerShell, Xcopy, or Robocopy.
Copy file name to clipboardExpand all lines: docs/debugger/includes/remote-debugger-download-cpp.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@
12
12
13
13
On the remote device or server that you want to debug on, rather than the Visual Studio machine, download and install the correct version of the remote tools from the links in the following table.
14
14
15
-
- Download the most recent remote tools for your version of Visual Studio. The latest remote tools version is compatible with earlier Visual Studio versions, but earlier remote tools versions aren't compatible with later Visual Studio versions. (For example, if you are using Visual Studio 2017, download the latest update of the remote tools for Visual Studio 2017. In this scenario, do not download the remote tools for Visual Studio 2019.)
15
+
- Download the most recent remote tools for your version of Visual Studio. The latest remote tools version is compatible with earlier Visual Studio versions, but earlier remote tools versions aren't compatible with later Visual Studio versions. (For example, if you are using Visual Studio 2019, download the latest update of the remote tools for Visual Studio 2019. In this scenario, do not download the remote tools for Visual Studio 2022.)
16
16
- Download the remote tools with the same architecture as the machine you're installing them on. For example, if you want to debug a 32-bit app on a remote computer running a 64-bit operating system, install the 64-bit remote tools.
17
17
- If you are remote debugging an ARM64EC application on an ARM64 device, install the ARM64 remote tools, and then launch the x64 remote debugger that gets installed with those tools. This can be found under: *Program Files (x86)\Microsoft Visual Studio\<version>\Common7\IDE\Remote Debugger\x64*.
Copy file name to clipboardExpand all lines: docs/debugger/includes/remote-debugger-download.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@
12
12
13
13
On the remote device or server that you want to debug on, rather than the Visual Studio machine, download and install the correct version of the remote tools from the links in the following table.
14
14
15
-
- Download the most recent remote tools for your version of Visual Studio. The latest remote tools version is compatible with earlier Visual Studio versions, but earlier remote tools versions aren't compatible with later Visual Studio versions. (For example, if you are using Visual Studio 2017, download the latest update of the remote tools for Visual Studio 2017. In this scenario, do not download the remote tools for Visual Studio 2019.)
15
+
- Download the most recent remote tools for your version of Visual Studio. The latest remote tools version is compatible with earlier Visual Studio versions, but earlier remote tools versions aren't compatible with later Visual Studio versions. (For example, if you are using Visual Studio 2019, download the latest update of the remote tools for Visual Studio 2019. In this scenario, do not download the remote tools for Visual Studio 2022.)
16
16
- Download the remote tools with the same architecture as the machine you're installing them on. For example, if you want to debug a 32-bit app on a remote computer running a 64-bit operating system, install the 64-bit remote tools.
Copy file name to clipboardExpand all lines: docs/debugger/includes/remote-debugger-install-iis-role.md
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -18,8 +18,16 @@ These steps show only a basic configuration of IIS. For more in-depth informatio
18
18
19
19
For Windows Server operating systems, use the **Add Roles and Features** wizard via the **Manage** link or the **Dashboard** link in **Server Manager**. On the **Server Roles** step, check the box for **Web Server (IIS)**.
20
20
21
-

21
+

22
22
23
-
On the **Role services** step, select the IIS role services you desire or accept the default role services provided. If you want to enable deployment using publish settings and Web Deploy, make sure that **IIS Management Scripts and Tools** is selected.
23
+
(Windows Server 2022) In the dialog box that appears, choose **Add Features** to add the IIS Management Console.
24
+
25
+
On the **Role services** step, select the IIS role services you desire or accept the default role services provided. If you want to enable deployment using publish settings and Web Deploy, make sure that the following features are selected:
26
+
27
+
-**IIS Management Scripts and Tools**
28
+
-**Management Service**
29
+
-**IIS Management Console**
30
+
31
+

24
32
25
33
Proceed through the confirmation steps to install the web server role and services. A server/IIS restart is not required after installing the Web Server (IIS) role.
Copy file name to clipboardExpand all lines: docs/debugger/remote-debugging-aspnet-on-a-remote-iis-7-5-computer.md
+31-25Lines changed: 31 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
---
2
2
title: "Remote debug ASP.NET on an IIS computer"
3
-
description: Learn how to set up and configure a Visual Studio ASP.NET MVC 4.5.2 application, deploy it to IIS, and attach the remote debugger from Visual Studio.
3
+
description: Learn how to set up and configure a Visual Studio ASP.NET MVC 4.8 application, deploy it to IIS, and attach the remote debugger from Visual Studio.
4
4
ms.custom: ['remotedebugging']
5
-
ms.date: 08/31/2021
5
+
ms.date: 08/29/2022
6
6
ms.topic: "conceptual"
7
7
ms.assetid: 9cb339b5-3caf-4755-aad1-4a5da54b2a23
8
8
author: "mikejo5000"
@@ -20,19 +20,18 @@ To debug an ASP.NET application that has been deployed to IIS, install and run t
This guide explains how to set up and configure a Visual Studio ASP.NET MVC 4.5.2 application, deploy it to IIS, and attach the remote debugger from Visual Studio.
23
+
This guide explains how to set up and configure a Visual Studio ASP.NET MVC 4.8 application, deploy it to IIS, and attach the remote debugger from Visual Studio.
24
24
25
25
> [!NOTE]
26
26
> To remote debug ASP.NET Core instead, see [Remote Debug ASP.NET Core on an IIS Computer](../debugger/remote-debugging-aspnet-on-a-remote-iis-computer.md). For Azure App Service, see [Remote debug ASP.NET Core on Azure](/learn/modules/dotnet-debug-visual-studio-azure-web-apps/) or, for Visual Studio Enterprise, use the [Snapshot Debugger](../debugger/debug-live-azure-applications.md) (.NET 4.6.1 required).
27
27
28
28
## Prerequisites
29
29
30
-
::: moniker range=">=vs-2019"
31
-
Visual Studio 2019 is required to follow the steps shown in this article.
32
-
::: moniker-end
30
+
Visual Studio 2019 or a later version is required to follow the steps shown in this article.
33
31
34
32
These procedures have been tested on these server configurations:
35
33
34
+
* Windows Server 2022 and IIS 10
36
35
* Windows Server 2012 R2 and IIS 8 (For Windows Server 2008 R2, the server steps are different)
37
36
38
37
## Network requirements
@@ -50,14 +49,13 @@ This article includes steps on setting up a basic configuration of IIS on Window
50
49
51
50
* If you want help to make sure that your app is set up, deployed, and running correctly in IIS so that you can debug, follow all the steps in this topic.
52
51
53
-
## Create the ASP.NET 4.5.2 application on the Visual Studio computer
52
+
## Create the ASP.NET 4.8 application on the Visual Studio computer
54
53
55
54
1. Create a new MVC ASP.NET application.
56
55
57
-
::: moniker range=">=vs-2019"
58
-
In Visual Studio 2019, type **Ctrl + Q** to open the search box, type **asp.net**, choose **Templates**, then choose **Create new ASP.NET Web Application (.NET Framework)**. In the dialog box that appears, name the project **MyASPApp**, and then choose **Create**. Select **MVC** and choose **Create**.
59
-
::: moniker-end
56
+
In Visual Studio, choose **File** > **Start window** to open the Start window, and then choose **Create a new project**. In the search box, type **asp.net framework**, and then choose **ASP.NET Web Application (.NET Framework)**. In the dialog box that appears, name the project **MyASPApp**, choose **ASP.NET Framework 4.8**, and then choose **Create**.
60
57
58
+
Select **MVC** and choose **Create**.
61
59
62
60
2. Open the *HomeController.cs* file, and set a breakpoint in the `About()` method.
63
61
@@ -67,7 +65,7 @@ This article includes steps on setting up a basic configuration of IIS on Window
67
65
68
66
## Update browser security settings on Windows Server
69
67
70
-
If Enhanced Security Configuration is enabled in Internet Explorer (it is enabled by default), then you may need to add some domains as trusted sites to enable you to download some of the web server components. Add the trusted sites by going to **Internet Options > Security > Trusted Sites > Sites**. Add the following domains.
68
+
If you are using Internet Explorer in an older version of Windows Server, the Enhanced Security Configuration is enabled by default. You may need to add some domains as trusted sites to enable you to download some of the web server components. Add the trusted sites by going to **Internet Options > Security > Trusted Sites > Sites**. Add the following domains.
71
69
72
70
- microsoft.com
73
71
- go.microsoft.com
@@ -76,15 +74,18 @@ If Enhanced Security Configuration is enabled in Internet Explorer (it is enable
76
74
77
75
When you download the software, you may get requests to grant permission to load various web site scripts and resources. Some of these resources are not required, but to simplify the process, click **Add** when prompted.
78
76
79
-
## <aname="BKMK_deploy_asp_net"></a> Install ASP.NET 4.5 on Windows Server
77
+
## <aname="BKMK_deploy_asp_net"></a> Install ASP.NET 4.8 on Windows Server
80
78
81
79
If you want more detailed information to install ASP.NET on IIS, see [IIS 8.0 Using ASP.NET 3.5 and ASP.NET 4.5](/iis/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45).
82
80
83
-
1. In the left pane of Server Manager, select **IIS**. Right-click the server and select **Internet Information Services (IIS) Manager**.
81
+
> [!NOTE]
82
+
> The Web Platform Installer reached End-of-Life on 7/1/22. For more information, see [Web Platform Installer - End of support and sunsetting the product/application feed](https://blogs.iis.net/iisteam/web-platform-installer-end-of-support-feed). You can directly install ASP.NET 4.8 from IIS.
83
+
84
+
1. In the left pane of Server Manager, select **IIS**. Right-click the server and select **Add Roles and Features**.
84
85
85
-
1.Use the Web Platform Installer (WebPI) to install ASP.NET 4.5 (from the Server node in Windows Server 2012 R2, choose **Get New Web Platform Components** and then search for ASP.NET)
86
+
1.In the wizard, advance to the **Features**section and install ASP.NET 4.8.
86
87
87
-

88
+

88
89
89
90
> [!NOTE]
90
91
> If you are using Windows Server 2008 R2, install ASP.NET 4 instead using this command:
@@ -106,9 +107,9 @@ If you need help to deploy the app to IIS, consider these options:
106
107
You can use this option create a publish settings file and import it into Visual Studio.
107
108
108
109
> [!NOTE]
109
-
> This deployment method uses Web Deploy, which must be installed on the server. If you want to configure Web Deploy manually instead of importing the settings, you can install Web Deploy 3.6 instead of Web Deploy 3.6 for Hosting Servers. However, if you configure Web Deploy manually, you will need to make sure that an app folder on the server is configured with the correct values and permissions (see [Configure ASP.NET Web site](#BKMK_deploy_asp_net)).
110
+
> If you want to configure Web Deploy manually instead of importing the publish settings, you will need to make sure that an app folder on the server is configured with the correct values and permissions (see [Configure ASP.NET Web site](#BKMK_deploy_asp_net)).
110
111
111
-
### Install and configure Web Deploy for Hosting Servers on Windows Server
112
+
### Install and configure Web Deploy on Windows Server
@@ -124,10 +125,13 @@ After the app deploys successfully, it should start automatically. If the app do
124
125
125
126
1. Switch to a debug configuration.
126
127
127
-
::: moniker range=">=vs-2019"
128
-
Choose **Edit** to edit the profile, and then choose **Settings**. Choose a **Debug** configuration, and then choose **Remove additional files at destination** under the **File Publish** options.
128
+
::: moniker range=">=vs-2022"
129
+
Choose **More Options** > **Edit** to edit the profile, and then choose **Settings**. Choose a **Debug** configuration, and then choose **Remove additional files at destination** under the **File Publish** options.
129
130
::: moniker-end
130
131
132
+
::: moniker range="vs-2019"
133
+
Choose **Edit** to edit the profile, and then choose **Settings**. Choose a **Debug** configuration, and then choose **Remove additional files at destination** under the **File Publish** options.
134
+
::: moniker-end
131
135
132
136
> [!IMPORTANT]
133
137
> If you choose a Release configuration, you disable debugging in the *web.config* file when you publish.
@@ -160,20 +164,20 @@ You can use this option to deploy your app if you want to copy the app to IIS us
160
164
161
165
You can also publish and deploy the app using the file system or other tools.
162
166
163
-
1. (ASP.NET 4.5.2) Make sure that the web.config file lists the correct version of .NET. For example, if you are targeting ASP.NET 4.5.2, make sure this version is listed in web.config.
167
+
1. (ASP.NET 4.8) Make sure that the web.config file lists the correct version of .NET. For example, if you are targeting ASP.NET 4.8, make sure this version is listed in web.config.
8. Open the remote computer's website. In a browser, go to **http://\<remote computer name>**.
@@ -249,7 +252,7 @@ For information on running the remote debugger as a service, see [Run the remote
249
252
- If the app tried to open, but you see a certificate warning, choose to trust the site. If you already closed the warning, you can edit the publishing profile, a *.pubxml file, in your project and add the following element (for test only): `<AllowUntrustedCertificate>true</AllowUntrustedCertificate>`
250
253
- If the app does not start from Visual Studio, start the app in IIS to test that it deployed correctly.
251
254
- Check the Output window in Visual Studio for status information, and check your error messages.
252
-
-
255
+
253
256
## <aname="bkmk_openports"></a> Open required ports on Windows Server
254
257
255
258
In most setups, required ports are opened by the installation of ASP.NET and the remote debugger. However, you may need to verify that ports are open.
@@ -269,6 +272,9 @@ Required ports:
269
272
270
273
* UDP 3702 - (Optional) Discovery port enables you to the **Find** button when attaching to the remote debugger in Visual Studio.
271
274
275
+
In addition, these ports should already be opened by the ASP.NET installation:
276
+
- 8172 - (Optional) Required for Web Deploy to deploy the app from Visual Studio
277
+
272
278
1. To open a port on Windows Server, open the **Start** menu, search for **Windows Firewall with Advanced Security**.
273
279
274
280
2. Then choose **Inbound Rules > New Rule > Port**. Choose **Next** and under **Specific local ports**, enter the port number, click **Next**, then **Allow the Connection**, click Next, and add the name (**IIS**, **Web Deploy**, or **msvsmon**) for the Inbound Rule.
0 commit comments