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

为君一笑 提交于 2019-12-21 05:16:10

问题


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?


回答1:


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.

REFERENCES

Thanks to Finbar Ryan.




回答2:


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...



来源:https://stackoverflow.com/questions/19292788/how-to-solve-microsoft-visual-studio-vs-error-unable-to-launch-the-iis-expr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!