如何解决“Microsoft Visual Studio (VS)”错误“无法启动 IIS Express Web 服务器”

2024-03-16

PROBLEM

在某些情况下“微软 Visual Studio (VS) http://www.microsoft.com/visualstudio/eng“当你使用”时Microsoft Internet 信息服务 Express (IIS) http://www.iis.net/learn/extensions/introduction-to-iis-express/iis-express-overview“并且您在运行 Build 后已将网站项目附加到 IIS,并显示此错误消息

Unable to launch the IIS Express Web server.

如果异常消息不再显示,我该如何解决?


前置要求

最好的步骤是了解到底发生了什么。

  1. 下载并使用它“Sysinternals 进程监视器 (PM) http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx".

  2. 运行 PM 并创建过滤器'Process Name' 'is' 'iisexpress.exe'。现在您仅显示来自 IIS 的捕获事件。

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

  4. 双击第一行打开Operation = Process Start并查看运行 IIS 的完整参数的详细信息,尤其是“命令行”。

  5. Open "Command Line Interface (CLI) http://en.wikipedia.org/wiki/Command-line_interface" called "Command shell http://technet.microsoft.com/en-us/library/bb490954.aspx" 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

案例“应用程序池”

以下开关需要一个值:apppool

  1. 打开文件

     %userprofile%\documents\iisexpress\config\applicationhost.config`
    
  2. 在部分中查找sites > site您指定的项目或bindingInformation由 VS 附加。添加到部分application另一个参数applicationPool来自您用于项目的版本。

     <application path="/" applicationPool="Clr4IntegratedAppPool">
    
  3. 现在测试一下,完全关闭VS,再次打开项目并构建。

案例“配置”

  1. “删除 WebMatrix”或“创建符号链接”或在该位置替换它。

Ref

  • 谢谢芬巴尔·瑞安 http://blogs.msdn.com/b/finbar_ryan/archive/2013/01/02/debugging-the-unable-to-launch-the-iis-express-web-server-error-from-visual-studio-2012.aspx.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何解决“Microsoft Visual Studio (VS)”错误“无法启动 IIS Express Web 服务器” 的相关文章

随机推荐