Adding IIS UrlRewrite seems to break debugging on local IIS server

前端 未结 6 707
耶瑟儿~
耶瑟儿~ 2021-02-04 11:25

This issue is driving me insane: I was working on a recently created project and suddenly I was unable to debug that specific project.

I\'m using a local IIS 7.5 with t

6条回答
  •  长发绾君心
    2021-02-04 12:00

    Visual Studio, when starting up, will (for some reason) attempt to access the URL:

    /debugattach.aspx

    If you have a rewrite rule that redirects (or otherwise catches), say, .aspx files, somewhere else then you will get this error. The solution is to add this section to the beginning of your web.config's // section:

    
        
        
        
    
    

    This will make sure to catch this one particular request, do nothing, and, most importantly, stop execution so none of your other rules will get run. This is a robust solution, so feel free to keep this in your config file for production.

提交回复
热议问题