.net core 本地使用ip訪問


每個項目下面有一個隱藏文件夾,.vs文件夾 。里面有一個文件 applicationhost.config

<binding protocol="http" bindingInformation="*:55732:localhost" />
在這個節點下面復制一個,把localhost 改成你本地的ip

<bindings>
<binding protocol="http" bindingInformation="*:55732:localhost" />
<binding protocol="http" bindingInformation="*:55732:192.168.0.110" />
</bindings>
重新運行一下項目就ok了,

如果出現各種無法訪問的問題,iis無法調試的問題。先刪除.vs文件夾。重新啟動項目,在尋找其他原因。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM