asp.net web项目 绑定ip地址运行方式
解决方案下面查找文件夹路径 /.vs/config/applicationhost.config中找到如下节点
<sites> <site name="WebSite1" id="1" serverAutoStart="true"> <application path="/"> <virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" /> </application> <bindings> <binding protocol="http" bindingInformation=":8080:localhost" /> </bindings> </site> <site name="WebApplication1" id="2"> <application path="/" applicationPool="Clr4IntegratedAppPool"> <virtualDirectory path="/" physicalPath="C:\Users\Administrator\Desktop\AppCrash_w3wp.exe_20c42b9329a5a65ffdca25639cead6795959d8_98baeb8b_cab_0697cac1\BaseAssetCrash\WebApplication1" /> </application> <bindings> <binding protocol="http" bindingInformation="*:55490:127.0.0.1" /> </bindings> </site> <site name="TestApi" id="3"> <application path="/" applicationPool="Clr4IntegratedAppPool"> <virtualDirectory path="/" physicalPath="C:\Users\Administrator\Desktop\AppCrash_w3wp.exe_20c42b9329a5a65ffdca25639cead6795959d8_98baeb8b_cab_0697cac1\BaseAssetCrash\TestApi" /> </application> <bindings> <binding protocol="http" bindingInformation="*:55655:localhost" /> </bindings> </site> <siteDefaults> <!-- To enable logging, please change the below attribute "enabled" to "true" --> <logFile logFormat="W3C" directory="%AppData%\Microsoft\IISExpressLogs" enabled="false" /> <traceFailedRequestsLogging directory="%AppData%\Microsoft" enabled="false" maxLogFileSizeKB="1024" /> </siteDefaults> <applicationDefaults applicationPool="Clr4IntegratedAppPool" /> <virtualDirectoryDefaults allowSubDirConfig="true" /> </sites>
找到对应的项目,修改bindingInformation