win10/win7下vs2013自带IISExpress支持局域网访问

打开IISExpress安装目录(C:UsersAdministratorDocumentsIISExpressconfig),一般为我的文档下,用记事本打开applicationhost.config文件,找到:
<bindings>
    <binding protocol="http" bindingInformation="*:58975:localhost" />
</bindings>

在binding下边添加一行,如:

<bindings>
    <binding protocol="http" bindingInformation="*:19818:localhost" />
    <binding protocol="http" bindingInformation="*:19818:202.196.187.123" /><!-- 加入此行 -->
</bindings>
添加完后保存,然后重启iisexpress,按照上述步骤,在win7操作系统下已经可以正常访问,但是经测试win10下居然没有反应,后翻阅资料才发现(懂得太少),需要运行下边的语句:
打开运行窗口,输入CMD,enter,然后执行下边的命令即可。
netsh http add urlacl url=http://202.196.187.123:58975/ user=everyone 

上述202.196.187.123为本机ip地址,请根据自己的电脑进行修改。

有问题可以联系我,我的邮箱是:yxxrui@163.com,我的网址是:http://www.yxxrui.cn

原文地址:https://www.cnblogs.com/yxxrui/p/6025769.html