[Environment setup] vs-Visual Studio-IIS express supports LAN Access

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.