且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

重新安装后,iis无法在Web服务器上启动调试.远程服务器返回错误:(404)未找到.

更新时间:2023-02-24 08:00:49

挣扎了一段时间后,找到了解决方法.

  1. 在iis中的默认网站"下,在左窗格中选择应用程序名称.
  2. 双击中间窗格上的请求过滤".
  3. 单击右侧窗格上的编辑功能设置".
  4. 选中允许不公开动词"

有效.

After I reinstalled IIS for some other reason, I'm now unable to debug asp.net applications in visual studio using the 'local IIS' option. Before reinstalling IIS, everything was working fine.

This is the error I'm getting. unable to start debugging on the web server. the remote server returned an error: (404) not found.`

I checked the web.config, debug is true

<system.web>
    <authentication mode="None"/>
    <compilation debug="true" targetFramework="4.5"/>
    <httpRuntime/>
    <pages controlRenderingCompatibilityVersion="4.0"/>
</system.web>

Checked the applicationHost.config on C:\Windows\System32\inetsrv\config The RequestFiltering is set to Allow.

<configSections>
<sectionGroup name="system.webServer">
<sectionGroup name="security">
<section name="requestFiltering" overrideModeDefault="Allow" />
</sectionGroup>
</sectionGroup>
</configSections>

I checked the debugger log. Doesn't give any clue. %UserProfile%\AppData\Local\Temp\Visual Studio Web Debugger.log It shows

IIS 10.0 Detailed Error - 404.6 - Not Found

along with some html content. That's where it mentioned about Request Filtering, but that looks good.

I'm not sure what could have ruined the debugging feature.

After struggling for a while, found the solution.

  1. In iis, under Default Web Site, select the application name on the left pane.
  2. Double click Request Filtering on the middle pane.
  3. Click on Edit Feature Settings on the right pane.
  4. Check 'Allow unlisted verbs'

It worked.