Using IISExpress for addresses other than localhost

I recently had the need to use IISExpress on Windows 8 to provide a demo server to a number of Surface RT clients. I found this took me longer than I expected. It might be me but the documentation did not leap out.

So as a summary this is what I had to do, let us say for example that I want to serve out http://mypc:1234

  • Make sure you have a project  MyWebProject in Visual Studio that works for http://localhost:1234 using IISExpress
  • Open the TCP port 1234 on the PC in the Control Panel > Admin Tools > Firewall
  • Edit C:Users[current user]DocumentsIISExpressconfigapplicationhost.config and find the site name section for your Visual Studio project. And change the to .  This means IISexpress can now listen on this port for any IP address
  • You finally need to run IISExpress with administrative privileges. I did this by opening a PowerShell prompt with administrative privileges and running the command  C:Program FilesIIS Expressiisexpress.exe /site:MyWebProject

Once all this was done my client PCs could connect