What is debugattach.aspx and why can't the server find it?

前端 未结 8 1799
悲&欢浪女
悲&欢浪女 2021-01-17 16:05

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

相关标签:
8条回答
  • 2021-01-17 16:46

    The solution that works for me was to restart VStudio in Run As Administrator Mode.

    0 讨论(0)
  • 2021-01-17 16:51

    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

    0 讨论(0)
提交回复
热议问题