启动ASP.NET 5 RC1应用程序时,IIS Express + HttpPlatformHandler崩溃

met*_*art 8 .net iis-express asp.net-core

从ASP.NET 5 beta 7升级到RC1后,尝试从Visual Studio中启动IIS Express中的Web应用程序,结果为"尝试确定托管应用程序的DNX进程的进程ID时出错".

在Windows事件日志中,我可以看到以下错误:

  • 流程'1828'未能启动.端口= 31115,错误代码=' - 2147024891'.(EventID 1000;总是发生这种情况)
  • 警告:无法创建stdoutLogFile \?\ C:_temp_httpplatform-stdout.log_6072_2015128124832.log,ErrorCode = -2147024864.(EventID 1004;有时只会发生这种情况)

HttpPlatformHandler配置中配置的日志文件确实已创建但完全为空,以及VS Output窗口.

如何诊断失败的原因?

相关版本是:

  • Visual Studio Enterprise 2015 Update 1
  • DNX SDK版本:1.0.0-rc1-update1
  • Windows 7企业版SP1(64位)

来自web.config的相关部分:

<system.webServer>
  <handlers>
    <add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
  </handlers>
  <httpPlatform processPath="%DNX_PATH%" 
                arguments="%DNX_ARGS%" 
                stdoutLogEnabled="true" 
                stdoutLogFile="C:\_temp\_httpplatform-stdout.log"
                startupTimeLimit="3600" 
                forwardWindowsAuthToken="false" />
</system.webServer>
Run Code Online (Sandbox Code Playgroud)

也许有趣的是,最初当我尝试运行从模板创建的全新ASP.NET 5 Web应用程序时,它起作用了.现在它也没有.

更新:尽管IIS Express启动时出错,但返回502.3 Bad Gateway错误

Jon*_*Mon 1

所以,一位同事也遇到了类似的问题。

我最终检查了项目下的 .vs\config\applicationhost.config 文件。结果发现他的 <sites> 部分很糟糕。其中两个站点将 https 绑定到“*:44300:localhost”。我删除了一个(也将 http 绑定到 80 的那个),重新编号了站点,他的 IIS Express 现在可以工作了。