问题
I have a solution that I was originally building in Visual Studio 2012. I needed this to be available on my local network so I added an additional IP address binding to this file:
C:\Users\<name>\Documents\IISExpress\config\applicationhost.config
This all works without any issues. However, when I run the same solution through Visual Studio 2015 the site is no longer available on the network as configured in this file.
How do I configure Visual Studio 2015 to offer the same network availability?
回答1:
Right, no sooner as I had posted this question I figured out the problem.
Visual Studio 2015 doesn't use the global configuration file detailed above by default. It creates a solution specific version under the solution directory structure here:
<solution_dir>\.vs\config\applicationhost.config
Or you can add:
<UseGlobalApplicationHostFile>True</UseGlobalApplicationHostFile>
To your solution .csproj file.
来源:https://stackoverflow.com/questions/33709864/exposing-iisexpress-site-on-local-network-visual-studio-2015