VS 无法以IP地址调试解决办法 (无法创建网站..... 您必须为服务器名称指定localhost)

1、添加代码
在解决方案路径下 “.vs” 隐藏文件夹中"config"中的"applicationhost.config"中site\binding 节点内
<binding protocol="http" bindingInformation="*:端口号:IP地址" />
2、关闭VS
3、以管理员身份运行VS重新打开项目
在启动项目右键=>属性=>web 更改localhost为IP地址后 重新调试 OK

猜你喜欢

转载自blog.csdn.net/Session_W/article/details/121970093