VS本地調試 HTTP Error 400. The request hostname is invalid


操作系統環境:

  windows 10 專業版

編譯環境:

       vs2017

在applicationhost.config文件中增加了本機ip地址想和前端聯調

<bindings>
    <binding protocol="http" bindingInformation="*:7001:localhost" />
    <binding protocol="http" bindingInformation="*:7001:192.168.1.150" />
</bindings>

 

改好之后運行網站  localhost:7001  可以訪問   輸入192.168.1.150:7001就提示 HTTP Error 400. The request hostname is invalid

修改的方式為:vs2017用管理員方式打開,然后再打開項目運行,就能正常訪問了

 

參考自:https://www.bbsmax.com/A/D854jnE2zE/


免責聲明!

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



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