启动ASP.NET 5 RC1应用程序时IIS Express + HttpPlatformHandler崩溃 [英] IIS Express + HttpPlatformHandler crash when launching ASP.NET 5 RC1 application

查看:120
本文介绍了启动ASP.NET 5 RC1应用程序时IIS Express + HttpPlatformHandler崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从ASP.NET 5 beta 7升级到RC1后,尝试从Visual Studio内部在IIS Express中启动Web应用程序的操作以尝试确定承载您的应用程序的DNX进程的进程ID发生错误"结束.

After an upgrade from ASP.NET 5 beta 7 to RC1 an attempt to launch the web appplication in IIS Express from within Visual Studio ends with "An error occurred attempting to determine the process id of the DNX process hosting your application".

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

In Windows Event Log I can see following errors:

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

HttpPlatformHandler配置中配置的日志文件可以获取创建,但完全为空,以及"VS输出"窗口.

Log files as configured in the HttpPlatformHandler Configuration do get created but are completely empty, as well as VS Output window.

如何诊断失败的原因?

相关版本为:

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

web.config中的相关部分:

Relevant sections from 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>

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

What's perhaps also interesting is that initially when I tried to run a brand new ASP.NET 5 Web Application created from template, it worked. Now it doesn't either.

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

UPDATE: Despite the error IIS Express starts, but returns 502.3 Bad Gateway error

推荐答案

我刚刚为我的站点解决了此问题(尝试确定托管您的应用程序的DNX进程的进程ID时发生错误")-相同,正在升级从Beta 7到RC1.我相信这些项目最初是在Beta 4或5中创建的.

I just solved this issue for my sites ("An error occurred attempting to determine the process id of the DNX process hosting your application") - same boat, upgrading from Beta 7 to RC1. I believe these projects were originally created in Beta 4 or 5.

事实证明,较早版本的ASP.Net beta版在我的web.config中存在额外的垃圾,这些垃圾掩盖了请求.

It turns out there was extra garbage in my web.config from earlier versions of the ASP.Net beta, and these were mucking up the request.

我删除了这些:

  <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
  <remove name="OPTIONSVerbHandler" />
  <remove name="TRACEVerbHandler" />
  <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />

这些站点开始在IIS Express中正常运行.如果这对您不起作用,您可以尝试创建一个新项目并查看其是否正常工作-比较web.config,startup和project.json文件,以查看是否需要进行其他更改.

And the sites began running appropriately in IIS Express. If this doesn't work for you, you might try creating a new project and seeing if it works correctly - compare the web.config, startup, and project.json files to see if there are any other changes you need to make.

这篇关于启动ASP.NET 5 RC1应用程序时IIS Express + HttpPlatformHandler崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆