Environment: Win10 Pro, Visual Studio Community, IIS Express 10
VS2015 integrates with IIS Express, so you don't need to download it separately,
Default installation location: C:\Program files\iis Express\iisexpress.exe or C:\Program Files (x86) \iis Express\iisexpress.exe
Configuration file Location: C:\Program files (x86) \iis Express\appserver\applicationhost.config
Open this file and find the "Sites" node, where each site node represents a website
Several parameters of the node are described below:
Name: Names of station names
ID: This is a numeric code, unique, starting from 1, and so on.
ServerAutoStart: Needless to say, this is when IIS Express runs, does this site run automatically
<application path= "/" >
<virtualdirectory path= "/" physicalpath= "C:\YX_Touch"/>
</application>
Here is the site path settings, "/" This represents the root directory of the site, PhysicalPath represents the path of the previous root directory, where you can add multiple virtualdirectory nodes, as a virtual directory
<bindings>
<binding protocol= "http" bindinginformation= ": 8086:localhost"/>
</bindings>
This node is to represent access to the site through what way access, HTTP or HTTPS and so on, followed by the corresponding port has to bind the domain name, can be written as: 80:www.baidu.com
If you want to run more sites, just follow the configuration increase. Add a site: WebApplication1
<site name= "WebApplication1" id= "2" >
<application path= "/" applicationpool= "Clr4integratedapppool" >
<virtualdirectory path= "/" physicalpath= "E:\winform\Solution1\WebApplication1"/>
</application>
<bindings>
<binding protocol= "http" bindinginformation= "*:52026:localhost"/>
</bindings>
</site>
But the light to modify the configuration file is no use, you open the computer in the lower right corner of the cloud icon found that there is always only one site, if you want to run multiple sites at the same time need to open multiple IIS Express applications, how to open multiple? Use the following command line:
Iisexpress/config: "C:\Program files\iis express\appserver\applicationhost.config"/site:test/systray:true (note/ There is a space before Config/site/systray).
If you want to run more sites, you only need to add the configuration in the site configuration file applicationhost.config, then run more than one cmd in turn, and then follow the command line.
IIS Express configures multiple sites to run concurrently