在将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 Configuration所配置的日志文件确实会被创建,但是它们是完全空的,就像VS输出窗口一样。
如何诊断故障的原因?
相关版本为:
- Visual Studio Enterprise 2015 Update 1
- DNX SDK版本:1.0.0-rc1-update1
- Windows 7 Enterprise 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>
或许更有趣的是,当我尝试运行一个全新的ASP.NET 5 Web应用程序模板时,它起初是可以运行的。现在它也无法运行。
更新:尽管出现错误,IIS Express仍然启动,但返回502.3 Bad Gateway错误。
c:\ temp \
。 - Tratchernetstat -a -n -o
命令,它会显示正在使用该端口的进程的 PID。找到你的端口,然后使用 PID 查找对应的进程。或者尝试使用另一个端口... - Pawel