10

I'm having this error trying to debug my ASP.NET MVC app. I've set the app to "Use Local IIS Web server", and selected ASP.NET as the debugger. Running the site without debugging works just fine, but when I try to debug, I got this error:

Unable to start debugging on the web server. The web server could not find the requested source.

I'm using Visual Web Developer 2008 Express Edition.

Does anyone know how to fix this error? Thank you.

1
  • 1
    I've also seen this error when attempting to run/debug the app if the IIS website is not running.
    – Andy
    Commented Jul 17, 2013 at 4:48

10 Answers 10

17

For those encountering this with Visual-Studio 2012 and/or Windows 8 do the following.

You have to add .Net 3.5 (or 4.5) to your Turn Windows Features on or off window. You get to it via :

Control Panel -> Programs -> Turn Windows Features on or off

enter image description here

Click the Asp.Net 3.5 and the Asp.Net 4.5 check box in the IIS > WWW Service > Application Development Features folder.

6

Go to your web project's properties, then the "web" tab, then make sure that you're using the Visual Studio Development Server and not Local IIS or the custom webserver. I'm on VS2010 with Win7 and another developer was developing using a custom webserver URL and not the VS Dev Server

3
  • I'm in a situation where I can't use the VS Dev Server because I need a custom ISAPI rewriter. I'm able to keep the settings on IIS instead of VS Dev server, but then I get the error mentioned by OP. If I switch to VS Dev server, I can debug but I can't find my pages correctly since the ISAPI rewriter isn't included then. How can I debug while on IIS?
    – Flater
    Commented Nov 21, 2012 at 9:53
  • 2
    This fixes the issue for me as well, however I had been Deving for months under local IIS and debugging fine. Recently installed VS 2012 SP1 and now it is happening, not sure if there is a correlation.
    – Sean B
    Commented Jan 17, 2013 at 21:08
  • I have the same problem with the same Visual Web Developer 2008 Express Edition and I don't have any "Web" tab? I also couldn't find it under debug - commands. Is there some way to set it to display? Commented Apr 11, 2014 at 16:09
4

Sounds like you are trying to develop on IIS and not iis express or development server. If you are using asp.net mvc 4, make sure that the Application Pool is framework 4. If not just make sure that your app pool it matches your asp.net mvc version.

0
3

I had the same problem, and i fixed this way:

Go to IIS Manager -> Go to the site -> Error Pages -> Actions: edit feature settings.. -> Make sure you checked "detailed errors for local requests and custom error pages for remote requests".

1
  • Well, this tip saves me tons of time. One of my colleauge encountered this problem for a year until I showed this solution. Thanks Gazza. By the way, how did you figure this out?
    – Vincent
    Commented Apr 3, 2013 at 3:08
2

IF you are using IIS6 and did the add mapping for .* in IIS trick to get MVC working, when you added the .* handler to iisapi.dll you forgot to uncheck the "check the file exists" check box.enter image description here

0
1

Also, be sure that the URL you're configuring in Visual Studio matches your Host Headers (Edit Bindings) in IIS. This tripped me up for about an hour this morning before I realized my very stupid error.

0

Having maxRequestLength or maxAllowedContentLength set to a ridiculously large or small value will also trigger this error.

0

What i did, was just type the IP address in the web tab instead of "localhost"

0

This happened to me today. Turned out to be that the default website was stopped in iis. I had been working on a second website that didn't use it for a long time. Simple fix but took me a while to see it!

0

The root cause for this error can often be that the Windows Service W3SVC is not started. Check that this service in Windows Services console (services.msc) is started. In IIS you will now see the the Start icon is greyed out. This means that the W3SVC service is running.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.