Asp. Net configure IISExpress to allow external access,
1. Find the IISExpress configuration file, or in the (document/IISExpress/config) folder, open applicationhost. config, and find the following code:
<Site name = "WebSite1" id = "1" serverAutoStart = "true">
<Application path = "/">
<VirtualDirectory path = "/" physicalPath = "% IIS_SITES_HOME % \ WebSite1"/>
</Application>
<Bindings>
<Binding protocol = "http" bindingInformation = ": 8080: localhost"/>
<Binding protocol = "http" bindingInformation = "*: 8080: 192.168.1.1"/>
</Bindings>
</Site>
The name is the name of your Web project, find the configuration corresponding to your project, and then
<Binding protocol = "http" bindingInformation = "*: 8080: localhost"/>
Add
<Binding protocol = "http" bindingInformation = "*: 8080: 192.168.1.1"/>
Replace 192.168.1.1 with your own IP address and 8080 with your own port.
2. After you press the above button, the 400 error may occur when you access through the IP address. If yes, use the following method:
(1) Open the CMD command window as an administrator
(2) enter the following command:
Netsh http add urlacl url = http: // 192.168.1.1: 8080/user = everyone
Similarly, change the IP address and port to your own. If an error is reported, check whether the command is run as an administrator. Restart IISExpress and you can use the IP address to access it.
3. After completing the above two parts, other computers may not be able to access your server due to firewall reasons. In this case, use the following method (here the system is win8.1)
(1) control panel (select a category for viewing)-> system and security-> Windows Firewall, select Advanced Settings on the left
(2) Right-click inbound rules-> create rules-> port-> enter 8080 at a specific local port-> allow connection-> select all three options-> enter the new rule name-> complete
Now the external program can access your IISExpress.
Reprinted: http://blog.csdn.net/zhangjk1993/article/details/36671105