For original works, please indicate the source:Http://blog.csdn.net/qiujuer/article/details/40350385
When using Visual Studio to develop web pages, you may want to allow access from other devices on the LAN in debug mode for testing. Although it can be deployed on the server, debugging cannot be performed, and even debugging by the injection process cannot meet your needs. Therefore, debugging can only be performed in Visual Studio-IIS Express.
However, there will be a problem. You will find that the address in your browser will always be: http: // localhost: 32417/; input: 127.0.0.1: 32417 will not work! Input: computer name (or IP): the port cannot be accessed. This is amazing!
Visual Studio-IIS express also seems to have only one address:
To solve this problem, two conditions must be met:
1. Visual Studio must be started with administrator privileges
2. Configure the website configuration file on your Visual Studio-IIS Express server
The second step is implemented as follows:
When you start a website, click the Visual Studio-IIS express tray icon in the lower-right corner of the desktop to enter the main interface. Click the current website address. Then you will see a configuration item and click Configure to enter the configuration file:
You can also directly go to this directory:
Open the configuration file and find"Sites"Node-your website project:
By default, onlyLocalhostAdd a new item here:
For example:"<Binding protocol = "HTTP" bindinginformation = "*: 32417: 192.168.0.112"/>"
The port is followed by the IP address of your computer. Of course, you can check the status in your NIC:
After the program is saved, restart your vs program as an administrator and enter the project to run and debug again.
Now we can see two of the following websites:
Try now:
Success!
I encountered such a problem and saw some solutions on foreign forums. I summarized the problem and recorded it. I hope it will help you!
For original works, please indicate the source:Http://blog.csdn.net/qiujuer/article/details/40350385
[Environment setup] vs-Visual Studio-IIS express supports LAN Access