Bruno
Bruno

Reputation: 7221

How to solve "Microsoft Visual Studio (VS)" error "Unable to launch the IIS Express Web server"

PROBLEM

In some cases "Microsoft Visual Studio (VS)" when you use "Microsoft Internet Information Services Express (IIS)" and you have attached web site project to IIS after run Build shown this error message

Unable to launch the IIS Express Web server.

How can I solve it if exception message does not shown nothing more?

Upvotes: 4

Views: 9124

Answers (3)

Bruno
Bruno

Reputation: 7221

Pre-Requirements

The best step is catch what exactly is going on.

  1. Download and use for it "Sysinternals Process Monitor (PM)".

  2. Run PM and create filter 'Process Name' 'is' 'iisexpress.exe'. Now you show capture events only from IIS.

  3. Run building your VS project with key F5 and watch PM results.

  4. Open with double click first row with Operation = Process Start and look detail for full parameters to run IIS especially "Command line".

  5. Open "Command Line Interface (CLI)" called "Command shell" with Win+R write "cmd" put IIS command line value and run with Enter. Now you see the exact error:

     "C:\Program Files\IIS Express\iisexpress.exe"  /config:"C:\Users\{user_name}\Documents\IISExpress\config\applicationhost.config"  /site:"{project_name}" /apppool:"Clr4IntegratedAppPool"
    

SOLUTION

Case "apppool"

The following switch requires a value: apppool

  1. Open file

     %userprofile%\documents\iisexpress\config\applicationhost.config`
    
  2. Find in section sites > site your named project or by bindingInformation by attached from VS. Add to section application another parameter applicationPool from version what you use for your project.

     <application path="/" applicationPool="Clr4IntegratedAppPool">
    
  3. Now test it, close fully VS, open project again and build.

Case "config"

  1. "Remove WebMatrix" or "Create symlink" or replace it on that place.

Ref

Upvotes: 4

Kadir Demirel
Kadir Demirel

Reputation: 21

I tried almost everything but it didn't work. Then I restarted my computer. and iis express worked :) I don't know maybe a reboot was needed for what I did.

Upvotes: 0

Nezir
Nezir

Reputation: 6925

In my case i tried every post I found on net and nothing works, last thing I done is to change option on project right click/ use visual studio web server and all works well now...

Upvotes: 0

Related Questions