Skip to content

Commit 0bd02b2

Browse files
authored
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
1 parent 1313696 commit 0bd02b2

21 files changed

+93
-86
lines changed

docs/debugger/includes/remote-debugger-deploy-app-local.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@
1616

1717
1. In the **Publish** dialog box, select **Folder**, click **Browse**, and create a new folder, **C:\Publish**.
1818

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"
2027

2128
:::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.":::
2229

@@ -26,18 +33,15 @@
2633

2734
1. Switch to a debug configuration.
2835

29-
::: moniker range=">=vs-2019"
3036
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
3237

38+
![Screenshot of the Settings tab in the Publish dialog box. Configuration is set to Debug and the Publish button is selected.](../media/remote-debug-publish-debug-config.png)
3339

3440
> [!NOTE]
3541
> If you use a Release build, you disable debugging in the *web.config* file when you publish.
3642
3743
1. Click **Publish**.
3844

39-
![Screenshot of the Settings tab in the Publish dialog box. Configuration is set to Debug and the Publish button is selected.](../media/remotedbg_publish_debug_config.png)
40-
4145
The application publishes a **Debug** configuration of the project to the local folder. Progress shows in the Output window.
4246

4347
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.

docs/debugger/includes/remote-debugger-download-cpp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
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.
1414

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.)
1616
- 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.
1717
- 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*.
1818

docs/debugger/includes/remote-debugger-download.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
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.
1414

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.)
1616
- 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.
1717

1818
::: moniker range=">=vs-2022"

docs/debugger/includes/remote-debugger-install-iis-role.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,16 @@ These steps show only a basic configuration of IIS. For more in-depth informatio
1818

1919
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)**.
2020

21-
![The Web Server IIS role is selected in the Select server roles step.](../media/remotedbg-server-roles-ws2012.png)
21+
![Screenshot showing the Web Server IIS role selected in the Select server roles step.](../media/remote-debug-server-roles-ws2022.png)
2222

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+
![Screenshot showing IIS Management scripts and tools selected.](../media/remote-debug-server-config-add-scripts-and-tools.png)
2432

2533
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.
Loading
Loading
Loading
Loading
Binary file not shown.
Binary file not shown.
Loading

docs/debugger/remote-debugging-aspnet-on-a-remote-iis-7-5-computer.md

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
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.
44
ms.custom: ['remotedebugging']
5-
ms.date: 08/31/2021
5+
ms.date: 08/29/2022
66
ms.topic: "conceptual"
77
ms.assetid: 9cb339b5-3caf-4755-aad1-4a5da54b2a23
88
author: "mikejo5000"
@@ -20,19 +20,18 @@ To debug an ASP.NET application that has been deployed to IIS, install and run t
2020

2121
![Remote debugger components](../debugger/media/remote-debugger-aspnet.png "Remote_debugger_components")
2222

23-
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.
2424

2525
> [!NOTE]
2626
> 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).
2727
2828
## Prerequisites
2929

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.
3331

3432
These procedures have been tested on these server configurations:
3533

34+
* Windows Server 2022 and IIS 10
3635
* Windows Server 2012 R2 and IIS 8 (For Windows Server 2008 R2, the server steps are different)
3736

3837
## Network requirements
@@ -50,14 +49,13 @@ This article includes steps on setting up a basic configuration of IIS on Window
5049

5150
* 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.
5251

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
5453

5554
1. Create a new MVC ASP.NET application.
5655

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**.
6057

58+
Select **MVC** and choose **Create**.
6159

6260
2. Open the *HomeController.cs* file, and set a breakpoint in the `About()` method.
6361

@@ -67,7 +65,7 @@ This article includes steps on setting up a basic configuration of IIS on Window
6765

6866
## Update browser security settings on Windows Server
6967

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.
7169

7270
- microsoft.com
7371
- go.microsoft.com
@@ -76,15 +74,18 @@ If Enhanced Security Configuration is enabled in Internet Explorer (it is enable
7674

7775
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.
7876

79-
## <a name="BKMK_deploy_asp_net"></a> Install ASP.NET 4.5 on Windows Server
77+
## <a name="BKMK_deploy_asp_net"></a> Install ASP.NET 4.8 on Windows Server
8078

8179
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).
8280

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**.
8485

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.
8687

87-
![Screenshot of the Web Platform Installer 5.0 showing the search results for asp.net with the web platform component IIS: ASP.NET 4.5 circled in red.](../debugger/media/remotedbg_iis_aspnet_45.png)
88+
![Screenshot of IIS Add roles and features for IIS: ASP.NET 4.8 selected.](../debugger/media/remote-debug-iis-asp-dotnet-48.png)
8889

8990
> [!NOTE]
9091
> 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:
106107
You can use this option create a publish settings file and import it into Visual Studio.
107108

108109
> [!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)).
110111
111-
### Install and configure Web Deploy for Hosting Servers on Windows Server
112+
### Install and configure Web Deploy on Windows Server
112113

113114
[!INCLUDE [install-web-deploy-with-hosting-server](../deployment/includes/install-web-deploy-with-hosting-server.md)]
114115

@@ -124,10 +125,13 @@ After the app deploys successfully, it should start automatically. If the app do
124125

125126
1. Switch to a debug configuration.
126127

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.
129130
::: moniker-end
130131

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
131135

132136
> [!IMPORTANT]
133137
> 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
160164

161165
You can also publish and deploy the app using the file system or other tools.
162166

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.
164168

165169
```xml
166170
<system.web>
167-
<compilation debug="true" targetFramework="4.5.2" />
168-
<httpRuntime targetFramework="4.5.2" />
171+
<compilation debug="true" targetFramework="4.8" />
172+
<httpRuntime targetFramework="4.8" />
169173
<httpModules>
170174
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" />
171175
</httpModules>
172176
</system.web>
173177

174178
```
175179

176-
For example, the version should be 4.0 if you install ASP.NET 4 instead of 4.5.2.
180+
For example, the version should be 4.0 if you install ASP.NET 4 instead of 4.8.
177181

178182
[!INCLUDE [remote-debugger-deploy-app-local](../debugger/includes/remote-debugger-deploy-app-local.md)]
179183

@@ -228,7 +232,6 @@ For information on running the remote debugger as a service, see [Run the remote
228232
![RemoteDBG_AttachToProcess](../debugger/media/vs-2019/remotedbg-attachtoprocess.png "RemoteDBG_AttachToProcess")
229233
::: moniker-end
230234

231-
232235
7. Click **Attach**
233236

234237
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
249252
- 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>`
250253
- If the app does not start from Visual Studio, start the app in IIS to test that it deployed correctly.
251254
- Check the Output window in Visual Studio for status information, and check your error messages.
252-
-
255+
253256
## <a name="bkmk_openports"></a> Open required ports on Windows Server
254257

255258
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:
269272

270273
* UDP 3702 - (Optional) Discovery port enables you to the **Find** button when attaching to the remote debugger in Visual Studio.
271274

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+
272278
1. To open a port on Windows Server, open the **Start** menu, search for **Windows Firewall with Advanced Security**.
273279

274280
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

Comments
 (0)