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
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
+25-16Lines changed: 25 additions & 16 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,17 +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
-
Visual Studio 2019 is required to follow the steps shown in this article.
30
+
Visual Studio 2019 or a later version is required to follow the steps shown in this article.
31
31
32
32
These procedures have been tested on these server configurations:
33
33
34
+
* Windows Server 2022 and IIS 10
34
35
* Windows Server 2012 R2 and IIS 8 (For Windows Server 2008 R2, the server steps are different)
35
36
36
37
## Network requirements
@@ -48,12 +49,15 @@ This article includes steps on setting up a basic configuration of IIS on Window
48
49
49
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.
50
51
51
-
## 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
52
53
53
54
1. Create a new MVC ASP.NET application.
54
55
56
+
::: moniker range=">=vs-2019"
55
57
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**.
58
+
::: moniker-end
56
59
60
+
Select **MVC** and choose **Create**.
57
61
58
62
2. Open the *HomeController.cs* file, and set a breakpoint in the `About()` method.
59
63
@@ -63,7 +67,7 @@ This article includes steps on setting up a basic configuration of IIS on Window
63
67
64
68
## Update browser security settings on Windows Server
65
69
66
-
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.
70
+
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.
67
71
68
72
- microsoft.com
69
73
- go.microsoft.com
@@ -72,11 +76,12 @@ If Enhanced Security Configuration is enabled in Internet Explorer (it is enable
72
76
73
77
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.
74
78
75
-
## <aname="BKMK_deploy_asp_net"></a> Install ASP.NET 4.5 on Windows Server
79
+
## <aname="BKMK_deploy_asp_net"></a> Install ASP.NET 4.8 on Windows Server
76
80
77
81
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).
78
82
79
-
1. In the left pane of Server Manager, select **IIS**. Right-click the server and select **Internet Information Services (IIS) Manager**.
83
+
> [!NOTE]
84
+
> 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.
80
85
81
86
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)
82
87
@@ -102,9 +107,9 @@ If you need help to deploy the app to IIS, consider these options:
102
107
You can use this option create a publish settings file and import it into Visual Studio.
103
108
104
109
> [!NOTE]
105
-
> 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)).
106
111
107
-
### Install and configure Web Deploy for Hosting Servers on Windows Server
112
+
### Install and configure Web Deploy on Windows Server
@@ -120,7 +125,9 @@ After the app deploys successfully, it should start automatically. If the app do
120
125
121
126
1. Switch to a debug configuration.
122
127
128
+
::: moniker range=">=vs-2019"
123
129
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.
130
+
::: moniker-end
124
131
125
132
126
133
> [!IMPORTANT]
@@ -154,20 +161,20 @@ You can use this option to deploy your app if you want to copy the app to IIS us
154
161
155
162
You can also publish and deploy the app using the file system or other tools.
156
163
157
-
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.
164
+
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>**.
@@ -241,7 +247,7 @@ For information on running the remote debugger as a service, see [Run the remote
241
247
- 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>`
242
248
- If the app does not start from Visual Studio, start the app in IIS to test that it deployed correctly.
243
249
- Check the Output window in Visual Studio for status information, and check your error messages.
244
-
-
250
+
245
251
## <aname="bkmk_openports"></a> Open required ports on Windows Server
246
252
247
253
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.
@@ -260,6 +266,9 @@ Required ports:
260
266
261
267
* UDP 3702 - (Optional) Discovery port enables you to the **Find** button when attaching to the remote debugger in Visual Studio.
262
268
269
+
In addition, these ports should already be opened by the ASP.NET installation:
270
+
- 8172 - (Optional) Required for Web Deploy to deploy the app from Visual Studio
271
+
263
272
1. To open a port on Windows Server, open the **Start** menu, search for **Windows Firewall with Advanced Security**.
264
273
265
274
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