大网数据广告活动
Web服务器与PHP

Cannot debug ASP.NET web applications

· 52CE 我爱测

This article provides resolutions for the problem that you can't debug an ASP.NET application in Microsoft Visual Studio .NET.

This article helps you resolve the problem where you can't debug an ASP.NET application in Microsoft Visual Studio .NET.

Original product version:   ASP.NET
Original KB number:   318465

Symptoms

When you debug an ASP.NET application in Visual Studio .NET, you may receive the following Development Environment error message:

Error while trying to run project: Unable to start debugging on the web server. The server does not support debugging of ASP.NET or ATL Server applications. Run setup to install the Visual Studio .NET server components. If setup has been run, verify that a valid URL has been specified.
You may also want to refer to the ASP.NET and ATL Server debugging topic in the online documentation. Would you like to disable future attempts to debug ASP.NET pages for this project?

Cause

This error may occur if the .NET Framework setup or installation was not completed correctly. When this occurs, the application mappings for ASP.NET file name extensions (such as .aspx) are not configured correctly in Internet Information Services (IIS).

To check whether the application mappings are correct, follow these steps:

  1. Select Start, point to Programs, point to Administrative Tools, and then select Internet Services Manager.

  2. Expand the node that corresponds to the local host (computer name), and then expand the Default Web Site node.

  3. Right-click your Web application directory, and then select Properties.

  4. On the Directory tab, under Application Settings, select Configuration.

  5. Select the App Mappings tab.

  6. On the App Mappings tab, under Application Mappings, check whether the .aspx extension is mapped to the following dynamic-link library (DLL):
    C:\Windows Directory\Microsoft.Net\Framework\<Version>\aspnet_isapi.dll

    [!NOTE] You must replace Windows Directory in this path with the correct directory for your system and replace Version with the version of the .NET Frame work installed on your system.

  7. If the application mapping entry is not found, follow the steps in the Resolution section.

Resolution

To resolve this problem, use the Aspnet_regiis.exe administration utility that manages the installation and uninstallation of multiple versions of ASP.NET on a single computer.

To use the Aspnet_regiis.exe utility, follow these steps:

  1. Select Start, and then select Run.

  2. Type cmd in the Open box, and then select OK to open a command prompt.

  3. At the command prompt, use the cd command to change to the following directory:
    C:\Windows Directory\Microsoft.Net\Framework\Version

    [!NOTE] You must replace Windows Directory in this path with the correct directory for your system and replace Version with the version of the .NET Framework installed on your system.

  4. Type aspnet_regiis -i to configure the required application mappings correctly.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 04/07/2020
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。