c# vs2015 局域网联调调试本地项目

转:https://www.cnblogs.com/wxylog/p/6566163.html

1.关闭vs2015, 这是关键一步, 否则可能一直会不能正常访问   Bad REquest

2. 打开项目目录下的.vs目录, 修改applicationhost.config文件中的内容

 

3. 找到你的项目, 增加一行

1
2
3
4
5
6
7
8
9
10
11
12
<!--找到项目名-->
        <site name="muTian.sysAdmin.UI.Portal" id="2">
            <application path="/" applicationPool="Clr4IntegratedAppPool">
                <virtualDirectory path="/" physicalPath="D:CsharpProjectmuTian.sysAdminmuTian.sysAdmin.UI.Portal" />
            </application>
            <bindings>
<!--这一行是默认就有的-->
                <binding protocol="http" bindingInformation="*:10829:localhost" />
                <!--这一行是增加的-->
<binding protocol="http" bindingInformation="*:10829:192.168.0.110" />
            </bindings>
        </site>           

 4. 再次使用管理员权限打开 Vs2015, 运行, 然后看看你的IISExpress

原文地址:https://www.cnblogs.com/xuhansan/p/11797362.html