A few days ago, Jason Zander wrote on his blog about the release of Visual Studio 2010 SP1 Beta (see links below, at the end of the article). I am glad to share with you, friends, news that SP1 Beta has added the ability to integrate with IIS Express in Visual Studio. For this integration, you will need to download IIS Express separately after you install SP1 Beta. After downloading and installing IIS Express, you will be able to create web projects and websites that use IIS Express instead of Cassini (the default web server used in Visual Studio). To learn more about the difference between IIS Express and full IIS or Cassini, please read the blog entry by Scott Guthrie, which is attached at the end of the article. Visual Studio 2010 offers two web project options: the Web Application Project (WAP) project and the Website project. You can use both types of projects with IIS Express.
Setting up web projects to use IIS Express
Both types of projects (WAP and Website) previously used by Cassini can easily use IIS Express. All you need to do is choose the option “Use IIS Express” from the context menu of “Use IIS Express”. Take a look at the screenshot that demonstrates this command.

')
After running this command, your project will use IIS Express instead of Cassini. In order to go back to Cassini you will need to execute the command “Use Visual Studio Development Server ...” in the same context menu. In addition, you can make IIS Express your default server for all new projects.
When creating projects of the Website type, you can choose to use IIS Express instead of Cassini. When you run File-> New-> Web Site you will see the updated New Web Site dialog. In this window, you need to click the Browse button (see the screenshots below).

After that, you will be offered a choice of the location of where your site should be placed. Here you can select “Local IIS” and create a site in IIS Express.

In this window, you need to select “IIS Express Sites” and click the “Create New Site” button in the upper right corner. Having executed this command you will create a site for your project in IIS Express.
Installing IIS Express Default Server
In order to set IIS Express as the default server for all new web projects, you need to go to the Visual Studio menu under Tools-> Options-> Projects and Solutions-> Web Projects and highlight “Use IIS Express for new file- based web sites and projects ”. The picture below shows this menu item.

After setting this value, all new web projects and sites will use IIS Express by default. Note: all previously created projects running on Cassini will need to be transferred to IIS Express manually.
Using IIS Express
After you enable IIS Express for projects and start the project for execution or start debugging it from Visual Studio, you will see the appearance of a new icon in the Windows notification panel (tray). You can right-click on the icon in order to quickly get a list of all applications running via IIS Server. Each such application has its own context menu, through which you can launch the application in the browser or stop its execution on the server.

You can select “Show All Applications” to open a window with a list of all projects running on IIS Express. Below is an example of such a window.

The following are the important options available in this window:
- URL of each application;
- version of the runtime for each application;
- path to the application on the disk;
- path to the applicationHost.config settings file.
The default settings file applicationHost.config is located in your Users folder. This allows IIS Express to work without administrative privileges. As you know, a full IIS server uses applicationHost.config to store its parameters. IIS Express as well as IIS uses the same file (but not the same). The file that uses IIS is stored in the System32 directory and is the same for all Windows users. The file that is used by IIS Express is specific to each individual user.
As for runtime time, this is the CLR version that the application pool will use. For application pools in IIS Express, the default CLR 4.0 is used. You can change this default behavior in the applicationHost.config settings of your IIS Express. Visual Studio assigns a CLR version based on application settings.
You can specify several options for your web application directly in Visual Studio. If you select the Properties item in the context menu of Solution Explorer, you will see something similar to the following screenshot.

These settings change the order in which IIS Express launches your application. One of the most important features that was not in Cassini is SSL support. IIS Express has such support. For example, for the site I changed the value of the “SSL Enabled” parameter to True and received a new URL assigned to the site, so now I can visit it with SSL support. Note that IIS Express installs its own certificate and you will receive a security warning in browsers.

Another important thing to be aware of: when you change the settings for running IIS Express, they are saved in the applicationHost.config file for IIS Express but not in the project itself. So, if you work in a team, then your colleagues should repeat these settings in themselves.
To edit settings that are not shown in the above window, you need to edit applicationHost.config directly. You can easily access the desired file by clicking the link in the IIS Express (Show All Applications) window. For projects like WAP, you can change the port used by IIS Express.
Known limitations
While in the work of IIS Express, there are a number of limitations:
- no support for profiling;
- If you want to remove the Web Deployment Project from the WDP;
- Some issues using WDP for IIS Express sites with sub-webs.
useful links