I\'m developing on an XP (SP3) machine with VS 2010 and IIS 5.
I have two versions of the same site. We\'ve released our first production version, so I forked the c
The solution that works for me was to restart VStudio in Run As Administrator Mode.
For performance reasons we removed all the handlers from the <system.webServer>
element of our MVC 5 project's web.config
except for StaticFile
and ExtensionlessUrlHandler-Integrated-4.0
, and then started getting this error when debugging from Visual Studio.
After some investigation, we discovered that in normal use, whatever module that handles this request simply causes HTTP error 401 (unauthorized) to be returned. I was not able to find out exactly which module it was, but I was able to find the class that is responsible: System.Web.HttpDebugHandler.
Therefore, we added the following line into our web.config
handlers:
<add name="DebugAttachHandler" path="DebugAttach.aspx" verb="DEBUG"
type="System.Web.HttpDebugHandler" resourceType="Unspecified" requireAccess="Script"
preCondition="integratedMode,runtimeVersionv4.0" responseBufferLimit="0" />
When that URL is hit, IIS gives out a 401 just as when all handlers are enabled, so Visual Studio is happy again.
See also: https://developercommunity.visualstudio.com/content/problem/464980/unable-to-start-debugging-a-web-project-when-vs-ge.html