Reputation: 1345
Getting this on Windows 10 Pro, Visual Studio 2017. ASP .NET Framework 4.6
Upvotes: 8
Views: 7435
Reputation: 1009
This answer was first described here.
This is most likely a problem with URL Rewrite rules redirecting the DEBUG request Visual Studio sends to the Project Url:
Request URL: https://Project.Url:443/debugattach.aspx
HTTP_METHOD: DEBUG
In our case, all .aspx
requests were being redirected to index.aspx
so we added this:
<rule name="DebugBypass" stopProcessing="true">
<match url="^.*$"/>
<conditions>
<add input="{HTTP_METHOD}" pattern="^DEBUG$" />
</conditions>
<action type="None"/>
</rule>
Worked like a charm.
FYI - Discovered this by turning on Failed Request Tracing for the Project URL and evaluating the trace log.
Upvotes: 1
Reputation: 5654
Another thing to check for, in our case our live config had the DEBUG verb denied:
<security>
<requestFiltering removeServerHeader="true">
<verbs>
<!--disable DEBUG verb-->
<add verb="DEBUG" allowed="false" />
</verbs>
</requestFiltering>
</security>
Upvotes: 0
Reputation: 1691
I had this issue and found that removing a https rewrite rule to force www fixed it for me.
Upvotes: 14
Reputation: 1345
Using the task manager to close all Visual Studio processes currently running and restarting visual studio fixed the issue.
Upvotes: 1