1、找到IISExpress目录
IISExpress\config\applicationhost.config
<site name="RMS.Web" id="18"> <application path="/" applicationPool="Clr4IntegratedAppPool"> <virtualDirectory path="/" physicalPath="C:\workgroup\Web" /> </application> <bindings> <binding protocol="http" bindingInformation="*:61730:localhost" /> </bindings> </site>
2、加上下面配置文件中黄色标记的代码
<site name="RMS.Web" id="18"> <application path="/" applicationPool="Clr4IntegratedAppPool"> <virtualDirectory path="/" physicalPath="C:\workgroup\RMS.Web" /> </application> <bindings> <binding protocol="http" bindingInformation="*:61730:localhost" /> <binding protocol="http" bindingInformation="*:61730:*" /> </bindings> </site>
3、用管理员打开VS,运行程序
4、在局域网内的另一台机器上,打开浏览器,输入ip地址加端口号,从上面配置文件中可以看到程序端口号为:61730,现在你可以正常访问iisexpress中的网站了
时间: 2024-10-09 20:02:39