开发时发现,在IDE中启动调试后,只能通过localhost+端口方式访问,才能成功,并能触发程序中设置的端点。这在整体调试,客户端通过IP访问时非常不方便。苦恼好久。
解决办法如下:
编辑解决方案目录下的.\.vs\config\applicationhost.config文件
将<sites>节点下
<site ...>
...
<bindings>
<binding protocol="http" bindingInformation=":8080:*" />
</bindings>
</site>
bindingInformation 中的localhost改为* 即可。