[Dev Tip] 5 Internal things that you should know about IIS Express


#1 : Where does the basic configuration information stored ?

The basic information related to the IIS Express are stored inside the project file (proj file)  within the property group information section.  To view it, Open the Project File in edit mode ( In this case I will strongly recomand you to use Visual Studio productivity Tool ) ; where you can edit the project file using “Power Command” as shown in the image below.

EditProjectFilesusingPowerCommands thumb 5 Internal things that you should know about IIS Express

Once you have the  project file in edited mode, you can search for below configuration section, where you can see the application information related to IIS Express are set.

IISExpressSettings thumb 5 Internal things that you should know about IIS Express

You can change the configuration editable values and update the project files to take the changes effects.

If your application has the SSL Enabled, IISExpressSSLPort will have the values specified for the SSL  port number.

IISPortEnabled thumb1 5 Internal things that you should know about IIS Express

#2 : Where is the configuration settings related to bindings and virtual directory?

Project files have the information related to the IIS Express and it’s basic settings; whereas there are several configuration files that are required to host and run a web application.  You can find all the IIS Express related files under \users\<username>\My Documents \ IISExpress\Config .

IISExpressConfigFiles thumb 5 Internal things that you should know about IIS Express

Open the “applicationhost.config” file in any text editor, and search for your web application name. You will find a section similar to the image shown in below.

ConfigurationSettings thumb 5 Internal things that you should know about IIS Express

As you can see this section contains the information related with the physical path of  IIS Express Virtual Directory, application pool  and the several bindings information.

The aplicationhost.config files are user specific.

#3 :  Applying Multiple Bindings With IIS Express

You can add additional bindings within the “bindings” elements to access your sites using different urls.

<bindings>
<binding protocol="http" bindingInformation="*:53294:localhost" />
<binding protocol="http" bindingInformation="*:53295:my-pc" />
<binding protocol="https" bindingInformation="*:44302:localhost" />
</bindings>

For an example if you have the above bindings in the binding configuration section, you will be able to acess the site using http://my-pc:53259 ( where my-pc has to be configure in your host files )

#4 : There is an additional application – IISExpressTray

When you press F5 to run the project, Visual Studio automatically launches the IIS Express and it will show up in your task-bar tray while it’s running.

 5 Internal things that you should know about IIS Express

You can right-click and  select the “Application”  to get the list of currently active URL’s for the current application.  To navigate, you have to click on the site URL.

IISApplicationHost thumb 5 Internal things that you should know about IIS Express

Along with the hosting sites, IIS Express ( IISExpress.exe)  is the parent process of an another application “IISExpressTray.Exe”. You can launch this application by just right click on IIS Express Icon on system tray icon and then select “Show All Applications” .

Following snaps shows the overall process hierarchy of IIS Express with in Visual Studio.

IISExpressTray thumb 5 Internal things that you should know about IIS Express

#5 : Quick way to get the details of the site configurations

From the application url lists, you can select any of the url / sites ; IISExpress tray application will show you different additional details such as runtime, application path and configuration file as shown the below image.

ApplicationDetails thumb 5 Internal things that you should know about IIS Express

This is the easiest option to open the application configuration file for IIS Express.

That’s all ! Hope going forward this information will help you to work with IIS Express.

Thanks

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s