![](/img/trans.png)
[英]Unable to start debugging on the web server. The remote server returned an error: (404) Not Found. Error when starting debug in Visual Studio
[英]After reinstalling iis unable to start debugging on the web server. the remote server returned an error: (404) not found.`
由于某些其他原因重新安装 IIS 后,我现在无法使用“本地 IIS”选项在 visual studio 中调试 asp.net 应用程序。 在重新安装 IIS 之前,一切正常。
这是我得到的错误。 无法在 Web 服务器上开始调试。 远程服务器返回错误:(404) 未找到。`
我检查了 web.config,debug 是真的
<system.web>
<authentication mode="None"/>
<compilation debug="true" targetFramework="4.5"/>
<httpRuntime/>
<pages controlRenderingCompatibilityVersion="4.0"/>
</system.web>
检查 C:\Windows\System32\inetsrv\config 上的 applicationHost.config RequestFiltering 设置为 Allow。
<configSections>
<sectionGroup name="system.webServer">
<sectionGroup name="security">
<section name="requestFiltering" overrideModeDefault="Allow" />
</sectionGroup>
</sectionGroup>
</configSections>
我检查了调试器日志。 没有给出任何线索。 %UserProfile%\AppData\Local\Temp\Visual Studio Web Debugger.log 它显示
IIS 10.0 详细错误 - 404.6 - 未找到
以及一些html内容。 那就是它提到请求过滤的地方,但这看起来不错。
我不确定是什么破坏了调试功能。
就我而言(Windows 10 和 Visual Studio 2017)我必须在Internet Information Services下安装ASP.NET 3.5和ASP.NET 4.7
点击开始菜单,然后运行
编写appwiz.cpl然后点击Ok
单击打开或关闭 Windows 功能
转到 Internet Information Services -> World Wide Web Services -> Application Development Features 并检查.NET Extensibility 3.5和.NET Extensibility 4.7 ,然后单击 Ok。
关闭 Visual Studio,然后重新打开它。
折腾了一阵子,找到了解决办法。
有效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.