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.

Victor
  • 30
  • 6
coder
  • 4,121
  • 14
  • 53
  • 88
  • Have you tried running VS in administrator mode? – Priyan Perera Feb 27 '18 at 03:22
  • You may also need to reset IIS. You can do that by opening an Administrator command prompt and typing iisreset, or you can do this in IIS Manage, more info on this doc: https://msdn.microsoft.com/en-us/library/dwesw3ee.aspx – Fletcher Feb 28 '18 at 05:25

2 Answers2

14

In my case (Windows 10 & Visual Studio 2017) I had to install ASP.NET 3.5 and ASP.NET 4.7 under the Internet Information Services

Click on start menu, then Run

Write appwiz.cpl and click Ok

enter image description here

Click on Turn Windows features on or off

enter image description here

Go to Internet Information Services -> World Wide Web Services -> Application Development Features and check the .NET Extensibility 3.5 and .NET Extensibility 4.7, then click Ok.

enter image description here

Close the Visual Studio, and then reopen it.

Tony Dong
  • 3,213
  • 1
  • 29
  • 32
Husam Ebish
  • 4,893
  • 2
  • 22
  • 38
3

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.

coder
  • 4,121
  • 14
  • 53
  • 88