Starting IIS Express from the command line

I've been working with IIS express for some time now, but only as an integrated webserver in Visual Studio. Today I stumbled upon a feature of IIS Express I didn't know existed. You can start IIS express from the commandline and host a webapplication on the fly. No Visual Studio needed.

To start IIS Express from the command line, first navigate to the IIS Express installation folder:

c:\Program Files\IIS Express

or for 64-bit:

c:\Program Files (x86)\IIS Express

With the following command you can host an application in the specified path on port 9090:

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

Very handy when you quickly want to test an application downloaded from the internet. In my case a beta of Umbraco CMS 5.0, I got it up and running in seconds.

For a more complete overview of all command line options of IIS Express read this article.

When you don't want to fire up the command prompt each time you want to launch IIS Express, Chris McLeod created a shell extension using some registry edits to add "IIS Express Website Here" to your context menu. It starts IIS Express in the selected directory, making things even more easy.

Share this article:

comments powered by Disqus