用vs自带的iis 支持非localhost访问

vs2013及以下版本:


C:\Users\当前计算机账户(这里是你当前登录计算机账户名)\Documents\IISExpress\config下的applicationhost.config中找到这个文件,然后增加binding值

比如原来有:
<binding protocol="http" bindingInformation="*:9999:localhost" />
那么需要再增加一个
<binding protocol="http" bindingInformation="*:9999:本机ip地址" />



vs2015及vs2017:
找到工程路径\.vs\config 文件夹下面的applicationhost.config 这个文件
修改方法同上



备注:如果设置了还是无法运行,可以再试试以管理员模式打开vs,再看看效果
两种环境都试过,测试成功

参考:http://blog.csdn.net/small_tu/article/details/50961478
参考:http://www.cnblogs.com/ffeng/p/4180247.html

猜你喜欢

转载自yh-fly.iteye.com/blog/2376040
今日推荐