Connecting to Visual Studio debugging IIS Express server over the lan

前端 未结 10 978
慢半拍i
慢半拍i 2020-11-27 10:19

I have a test ASP.NET MVC3 application developed in VS2012. When I start debugging the app is accessed from the host machine via the request to http://localhost:

10条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-27 11:16

    Had the a very similar issue debugging in Visual Studio Code, I solved it by adding:

    "env": {
          // ...
          "ASPNETCORE_URLS": "http://*:5000" // change to the port you are using
          // ...
    },
    

    .. to launch.json

    Apparently, by default it binds http protocol to 'localhost:5000', so it works with localhost but not with ip address - neither remotely nor locally.

    If you are trying to hit a breakpoint by a request coming from a different computer, don't forget to check your firewall settings (and/or antivirus)

    hope this helps

提交回复
热议问题