IIS Express GUI and Visual Studio 2010 integration

6 06 2013

I recently installed IIS Express on my machine. I found it useful and I developed a GUI for it that you can find here at codeplex:

The most surprising feature of IIS Express, in my opinion, is that you can install it on Windows XP and this is what I’m going to do and document in this post.
This is true only for version 7.5, for operating system versions after Windows Xp you can use IIS Express 8.0.

As far as Visual Studio 2010 integration is concerned you can use this article (Enabling IIS Express in VS2010) as a reference.
I will try to summarize the main points.

First of all you need to know that if you want to take advantage of IIS Express integration with Visual Studio 2010 you need to install Visual Studio Service Pack 1.
Once installed SP1 you will find the IIS Express integration features visible but not active. They will be enabled once you install IIS Express.
For example you will find a new checkbox under: Tools > Options > Projects and Solutions > Web Projects to tell Visual Studio to use IIS Express for new web projects. This checkbox is disabled unless you have installed IIS Express.

I downloaded IIS Express version 7.5 from: IIs Express 7.5
(for IIS Express version 8.0 the link is: IIs Express 8.0)

Once installed, you can go to Project Properties of your ASP.NET MVC project and, in the Web tab, in the section in which you’re supposed to specify the server to use, you have the option to specify: ‘Use Local IIS Web Server’.
If you choose this option, a suboption is automatically checked and greyed if you haven’t got a full IIS installed on your machine: ‘Use IIS Express’.

When you run the application (Ctrl + F5) the following message prompt will pop up:

virtualfolder

Clicking ‘yes’ a new web site and its Virtual Directory are configured in IIS Express configuration file (C:\Documents and Settings\[UserName]\My Documents\IISExpress\config\applicationhost.config) and then the web site is run, as usual, with the localhost url.
IIS Express shows a tray icon from which you can see the configured web sites and stop the currently running ones if you need.

If you want to quickly switch from using IIS Express to using Visual Studio Development Server, before running your website from inside Visual Studio, you can switch via the context menu on the project.
It provides the option: ‘Use IIS Express…’ / ‘Use Visual Studio Development Server…’.

You can find a reference for how to configure IIS Express in Visual Studio here:

IIs Express and Visual Studio

If you want to setup and run a website without opening Visual Studio you can run IIS Express from the command line.
For an extensive guide on how to do it you can refer to this post:
IIS Express from the command line

If you want an easiest way to do it you can try the GUI I published on CodePlex.

https://iisexpressgui.codeplex.com/

It’s really minimalist but, well, I’m working on it in my spare time (not so much time after all).