IIS Express supports LAN access

Reproduced in: https://www.cnblogs.com/liuxiaoji/p/5166476.html

vs2015 VS-Visual Studio-IIS Express supports LAN access

Web pages using the Visual Studio development when there is such a situation: you want to let other LAN equipment in debug mode accessible for testing. Although you can deploy to the server, but it can not be debugged, even if it is injected into the process of debugging it is unable to achieve their needs; it can only be debugged in Visual Studio-IIS Express in.

And this will be a problem, you will find your browser is always address: http: // localhost: 32417 / this; input: 127.0.0.1: 32417 No! Input: computer name (or IP): The same port can not be accessed. This wonderful work!

Visual Studio-IIS Express also seems to have only one address:

To solve this problem need to meet two conditions:

1.Visual Studio must start with administrator privileges

2. Configure your website profile Visual Studio-IIS Express server

 

For the second step manner to achieve the following:

Start at the bottom right corner of the desktop site case click Visual Studio-IIS Express tray icon, enter the main interface, click on the current Web site address, then you will see there is a configuration in which the configuration click to enter the configuration file:

Also direct access to this directory:

Open the configuration file, find the " sites " node - your website project:

By default, only  LocalHost  this one, this adds a new item:

如:“<binding protocol="http" bindingInformation="*:32417:192.168.0.112" />

端口后面是你的电脑的IP地址,当然IP地址你可以看看你的网卡中的状态:

保存好后,使用管理员重启你的 VS 程序,进入项目再次进入运行调试。

此时可以看见下面的网站有两个了:

现在试试:

Guess you like

Origin blog.csdn.net/taoerchun/article/details/90513227