22
votes

When trying to debug a web application configured to use IIS Express 7.5 in Visual Studio 2010, I received the following error "Unable to launch the IIS Express Web server"

When running from the command line with the /trace:error switch I got the following

C:\Program Files (x86)\IIS Express>iisexpress.exe /trace:error
Starting IIS Express ...
Initializing the W3 Server Started CTC = 1857831
W3 Server initializing WinSock. CTC = 1857847
W3 Server WinSock initialized. CTC = 1857847
W3 Server ThreadPool initialized (ipm has signalled). CTC = 1857847
Failed to call RegisterModule for dll=C:\Program Files (x86)\IIS Express\loghttp.dll, mod=HttpLoggingModule
Failed processing with hr = 800706ba
Error loading global modules. hr = 800706ba
Terminating W3_SERVER object
Start listenerChannel http:0
Initializing the W3 Server Started CTC = 1858845
W3 Server initializing WinSock. CTC = 1858861
W3 Server WinSock initialized. CTC = 1858861
W3 Server ThreadPool initialized (ipm has signalled). CTC = 1858861
Failed to call RegisterModule for dll=C:\Program Files (x86)\IIS Express\loghttp.dll, mod=HttpLoggingModule
Failed processing with hr = 800706ba
Error loading global modules. hr = 800706ba
Terminating W3_SERVER object
InitComplete event signalled
Report ListenerChannel stopped due to failure; ProtocolId:http, ListenerChannelId:0
Process Model Shutdown called
Waiting for all LISTENER_CHANNELS to stop
Failed to start 'HostedWASStart'. Error = 34022648
HostableWebCore activation failed.
Unable to start iisexpress.

Notes -

I have tried uninstalling and re-installing IIS Express 7.5 a number of times with the same results.

I am running a Windows 7 64-bit machine

IIS Express has been working without issue for a number of months now. The issue only started after restarting my computer this morning.

13
It happens sometimes, that WAS and W3SVC services hang permanently and the Internet Manager doesn't get control over inner site's 'restart' administrative option, so my suggestion is stop/start/restart the service in the Task Manager Services tab. It worked for me.Felix Aballi

13 Answers

14
votes

A couple of suggestions that may help:

How did you reinstall iis-express? If you haven't done so, you can try re-installing Visual Studio 2010 SP1, which contains iis-express.

Try using process monitor to watch the iis-express process to see if there are any permission issues when attempting to start it.

As a last resort, you can disable the logging module by modifying the applicationhost.config, which is located in the %userprofile%\documents\IISexpress\config directory. To do so you will need to comment out a couple lines in the file.

Under the <system.webServer>/<globalModules> element, comment out the line

<add name="HttpLoggingModule" image="%IIS_BIN%\loghttp.dll" />

Under the <location>/<system.webServer>/<modules> element, comment out the line

<add name="HttpLoggingModule" lockItem="true" /> 

After saving your changes try restarting iis express.

17
votes

I got the same thing after doing a windows update last night. So what i did to fix mine was renamed the automatically created folder "IISExpress" which on my system was in the My Documents folder. Then I restarted VS and it recreated that IISExpress folder for me - back to working condition. Then launch VS again and the problem should be resolved. At least it worked on my system.

5
votes

I was facing same issue and to solve this problem this is what I did

  1. Closed Visual studio 2013
  2. opened in admin mode - and it worked !
4
votes

Close Visual Studio. Delete your application's applicationhost.config file - It will be rebuilt when you reopen the project in VS.

2
votes

In my case I had to turn off the Windows Firewall. Seems that firewall is blocking local Webserver to run properly. Even if I try to manually allow WebDev.WebServer40.exe to run through firewall I still get this error.

UPDATE Allow through firewall C:\Program Files\IIS Express\iisexpress.exe and iisexpresstray.exe and you can have turned on the firewall.

2
votes

I tried all these answers, but none worked.

In my case I found that the CustomUserHome value was set in the HKEY_CURRENT_USER\Software\Microsoft\IISExpress registry key, and apparently the value was not accessible to IISExpress. I removed the value and I could launch again from Visual Studio.

2
votes

Newer version of VS than the original question, but deleting my <projectname>.csproj.user file (which contains the local, project-specific IIS Express settings) and then restarting VS fixed it immediately.

1
votes

I got Unable to launch the IIS Express Web server when I tried to run a MVC project created on a UNC path. When I moved the project to the local disk, it started working fine.

1
votes

I had the same issue but due to a different reason. I'll post my solution here so it may help others.

Open a commandprompt in admin mode. TYPE: netsh http show iplisten If there are any entries: TYPE: netsh http delete iplisten Repeat until all are removed and try to run IIS Express again.

Hope this helps! Niels

0
votes

I had the same errors but for a single account used to install. I had Visual Studio 2010 SP1 with IIS 8 Express in w7 x64. I couldn't change my web project to use IIS Express without VS freezing. I uninstalled IIS 8 Express and installed IIS 7.5 Express which I knew worked on another machine. However, I still got the same problem. After some time trying things out I discovered the IISExpress folder in My Documents was not removed at uninstall. I had to uninstall, manually remove the folder then reinstall. At first start, the IISExpress fodler was recreated and now works as expected. HTH

0
votes

My problem was a bit different, but I post here in case someone else could find this useful. I'm trying to use iisexpress as my local webserver on port 80, but after upgrading from Win 7 to Win 8 it gave me a similar error as above. The thing that finally helped was to stop the service called "World Wide Web Publishing Service" (W3SVC) via the Services control panel app under Administrative Tools, and change it to be started manually. It had port 80 opened, and that was the problem.

0
votes

For some reason the previous port was no longer available - perhaps a rogue process. Anyhow, I bumped up the port number and it started working again.