Connecting to Visual Studio debugging IIS Express server over the lan

前端 未结 10 975
慢半拍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

    Update

    I made a video that better describes the process, https://youtu.be/5ZqDuvTqQVs

    If you are using Visual Studio 2013 or above, make sure you run it as an administrator for this to work.


    Open the %USERPROFILE%\My Documents\IISExpress\config\applicationhost.config (in VS2015 it may be $(solutionDir)\.vs\config\applicationhost.config) file. Inside you should see something like this:

    
        
            
        
        
            
        
    
    

    Change the bindingInformation=":8080:localhost" to bindingInformation="*:8080:*" (the port number, 8080 in my case, will differ.)

    Note: If it does not work try with bindingInformation="*:8080: the asterix can be removed.

    Then make sure your firewall is allowing incoming connections on that port. You may need to restart the system or at least Visual Studio to get IISExpress to reload the config file.

    If this doesn't work, take a look at this answer: https://stackoverflow.com/a/5186680/985284

提交回复
热议问题