IIS Express configures multiple sites to run concurrently

Source: Internet
Author: User

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

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.