Debugging the “Unable to launch the IIS Express Web server.” error from Visual Studio 2012.


I’ve recently solved this issue on my machine and thought I would share this with everyone.

Visual Studio 2012 is configured to use IIS Express by default and on my laptop I noticed that I started to see this error.


So I looked at how best to resolve this issue.
Sites from Web Matrix worked fine in IIS Express and IIS Express would launch from the command line.

I started by using Process Monitor to troubleshoot this issue.

I started Process Monitor and set up a filter like this.


I started by looking at the Process Start event.


I looked at the Properties of this event and noted that the Process was starting like this.

"C:\Program Files (x86)\IIS Express\iisexpress.exe"  /config:"C:\Users\MyUserName\Documents\WebMatrix\config\config\applicationhost.config"  /site:"WebApplication2(1)" /apppool:"Clr4IntegratedAppPool"

Then I tried running this from a command prompt and see this underlying error.

”The following site was not found in the configuration file: 'WebApplication2(1)'”

So now I know that

a) My IIS Express install is using the Web Matrix Config file.

b) It can’t find the site from my Visual Studio 2012 solution.

Issue Cause.

When Visual Studio 2012 is creating the site in IIS Express it is updating the config file at C:\Users\MyUsername\Documents\IISExpress\config\ and not the Web Matrix one.

I then remembered than when I installed Web Matrix it told me it could not access the IIS Express config file and if I would like to create a new config file.

It turns out that this adds a new REG_SZ value called CustomUserHome at HKEY_CURRENT_USER\Software\Microsoft\IISExpress.
This points to the Web Matrix Config file and not the IIS Express one.

I edited this registry key to point to C:\Users\MyUsername\Documents\IISExpress and now it all works.


I hope this helps.

Comments (9)
  1. Jitendra mali says:

    Unable to lounch iis web server in vs 2012 ultimate

  2. Sonny says:

    I could not find the IISExpress registry entry in Windows 7.

  3. Finbar Ryan says:

    Hi Sonny,

    I don't have a Windows 7 image at the moment to test against.

    I'll see if I can get one up and running and check if the registry key is there.



  4. Chris says:

    ON THE MONEY!!!! I jus t went from a demo using Web matrix to a demo using VS 2012 and Bingo! same problem.  This fixed It THANK YOU

  5. Should have updated on,  project >> Properties >> Web (tab). On Web tab you will see the choices from IIS Express 7/8 (if installed) and in Server Section Use Visual Studio Development Server.


    Aamir Qureshi

  6. shahul says:

    super aamir

  7. Bob says:

    Aamir's technique worked perfectly and easily!

  8. Finbar Ryan says:

    Hi, thanks for all of your comments on this post. I agree that switching to the Asp.Net Development Server may be an acceptable workaround for some people. The reason that we have IIS Express is an option is that it's the same engine as the full IIS Server and so offer's better fidelity when debugging Asp.Net issues. ScottGu talks more about this at…/introducing-iis-express.aspx



  9. IjemOfili says:

    so where are the steps to resolve the issue

Comments are closed.

Skip to main content