A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Magnus Rahl
Nov 4, 2010
  9422
(0 votes)

Running EPiServer CMS in IIS Express

Introducing IIS Express

This summer Microsoft released their WebMatrix platform. WebMatrix is intended as a getting started-kit for web development, containing SQL Server Express, Visual Web Developer Express, a number of example projects and snippets (and online access to more) and a web server: IIS Express.

IIS Express is built on the same core as IIS 7 but is designed to run in a stand-alone process in the current user’s context. This gives developers some new options:

  • Devs still stuck with Windows XP or Server 2003 can get an IIS 7 compatible web server running on their machines.
  • If you don’t want to run your sites in the local IIS when debugging from Visual Studio, you should be able to use IIS Express rather than the ASP.NET Development server and get the full IIS 7 feature set.

For more information on IIS Express, check out Scott Gu’s blog post

The Scenario

The reason I started exploring IIS express was that I wanted to run a dev/test site at home, on my home server. That machine is currently running Windows XP while my dev laptop is Windows 7. To avoid the hassle of double config sections I wanted to run IIS 7 on both machines. IIS Express fixes this.

Installing IIS Express

As mentioned, IIS Express is part of the WebMatrix bundle. So you have to download the WebMatrix installer, but you can then customize the install to include only the parts you need. IIS Express is part of the base set so at first I was trying to find it among the install options but I didn’t. It seems it’s always installed, but you don’t have to install Visual Web Developer etc. unless you want to.

Setting up a site in IIS Express

You can’t use EPiServer Deployment Center to install a site in IIS Express since it’s not run as a service. So there’s no (easy) way to install a new site on the machine running IIS Express.

When launching WebMatrix there is instead an option to create a site from a folder. So if you have installed the EPiServer site on another machine (in my case the dev laptop) you can just publish your solution to a folder and create a site from it in WebMatrix.

Running sites in IIS Express

WebMatrix is then the launch pad for your sites where you set their URL, port and start/stop the sites. It is however possible to launch IIS Express from a command prompt. It’s located in your Progam Files folder under Microsoft Web Matrix and is called iisexpress.exe.

Your site definitions will be stored in an xml file called applicationhost.config in a folder called IISExpress under the current user accounts Documents folder. This file will be used when launching iisexpress.exe and the first site defined (it seems) will be launched.

Using switches it is possible to set what site should be started and even which .config file should be used. So you can store the applicationhost.config in a central location away from the user settings folder if you like:

iisexpress /config:c:\myconfig\applicationhost.config /site:Website1

You can even start a site directly from the folder where it’s stored:

iisexpress /path:c:\myapp\ /port:80

Hosting a site using IIS Express

IIS isn’t intended for hosting. But since it can be started as a console app there’s at least a possibility to start it as a scheduled task when the computer starts up or to run it as a windows service using a generic host. But will it work? Out of curiosity I had to try and yes it will! With some limitations of course.

One limitation is that there is no way to set multiple host headers (at least not that I can find). The site is configured to run under a host/port combination, default to localhost/machine name and port 8080. Set it to use your external domain name and port 80 and it’s ready to go.

I did some basic testing using the free test on LoadImpact. There seems to be no connection limit, at least not up to the 50 connections that the free test uses. It seems to scale rather well in this connection count span, even with my rather weak hardware.

Nov 04, 2010

Comments

Jeff Wallace
Jeff Wallace Nov 4, 2010 04:39 PM

Nice write up. :)

Please login to comment.
Latest blogs
Cleaning Up Content Graph Webhooks in PaaS CMS: Scheduled Job

The Problem Bit of a niche issue, but we are building a headless solution where the presentation layer is hosted on Netlify, when in a regular...

Minesh Shah (Netcel) | Dec 17, 2025

A day in the life of an Optimizely OMVP - OptiGraphExtensions v2.0: Enhanced Search Control with Language Support, Synonym Slots, and Stop Words

Supercharge your Optimizely Graph search experience with powerful new features for multilingual sites and fine-grained search tuning. As search...

Graham Carr | Dec 16, 2025

A day in the life of an Optimizely OMVP - Optimizely Opal: Specialized Agents, Workflows, and Tools Explained

The AI landscape in digital experience platforms has shifted dramatically. At Opticon 2025, Optimizely unveiled the next evolution of Optimizely Op...

Graham Carr | Dec 16, 2025

Optimizely CMS - Learning by Doing: EP09 - Create Hero, Breadcrumb's and Integrate SEO : Demo

  Episode 9  is Live!! The latest installment of my  Learning by Doing: Build Series  on  Optimizely Episode 9 CMS 12  is now available on YouTube!...

Ratish | Dec 15, 2025 |

Building simple Opal tools for product search and content creation

Optimizely Opal tools make it easy for AI agents to call your APIs – in this post we’ll build a small ASP.NET host that exposes two of them: one fo...

Pär Wissmark | Dec 13, 2025 |

CMS Audiences - check all usage

Sometimes you want to check if an Audience from your CMS (former Visitor Group) has been used by which page(and which version of that page) Then yo...

Tuan Anh Hoang | Dec 12, 2025