打開C:\Users\用戶\Documents\IISExpress\config\applicationhost.config
獲取本地VS項目運行起來的端口,比如
然后在文本里搜索 24395
</application>
<bindings>
<binding protocol="http" bindingInformation="*:24395:localhost" />
<binding protocol="http" bindingInformation="*:24395:192.1.xxx.xxx" /> //新增一條
</bindings>
</site>
管理員運行CMD:執行netsh http add urlacl url=http://192.1.xxx.xxx:21459/ user=everyone