Ser*_*rov 9 asp.net-mvc iis-8 asp.net-core-mvc
我正在尝试发布我的MVC 6 Beta 8应用程序.我能够成功地将它发布到Azure,但是当我尝试将其发布到ASPHostPortal时,我收到500错误.
所以我尝试将应用程序发布到本地IIS,但也失败了.首先,我发现我需要安装HttpPlatformHandler(否则IIS无法加载web.config).但即使在那之后,我也得到了502.3错误.
HTTP Error 502.3 - Bad Gateway
There was a connection error while trying to route the request.
Run Code Online (Sandbox Code Playgroud)
同样在事件日志中,我可以从HttpPlatformHandler看到错误1000而没有描述.但它说"进程'0'未能启动.端口= 13679,错误代码='-2147024894'."
stdout.log已创建但为空.
这是我的web.config:
<configuration>
<system.webServer>
<handlers>
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/>
</handlers>
<httpPlatform processPath="..\approot\web.cmd" arguments="" stdoutLogEnabled="true" stdoutLogFile="stdout.log" startupTimeLimit="3600"></httpPlatform>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true" />
</system.webServer>
<system.web>
<customErrors mode="Off" />
<compilation debug="true" />
</system.web>
</configuration>
Run Code Online (Sandbox Code Playgroud)
我从哪里开始?
感谢Daniel的评论和https://github.com/aspnet/Hosting/issues/364我发现我通过Web Platform Installer安装的HttpPlatformHandler 1.0不支持相对路径.所以我安装了HttpPlatformHandler 1.2,现在它可以工作!!
替代解决方案(也适用于我)是在httpPlatform配置中使用完整路径而不是相对路径.
| 归档时间: |
|
| 查看次数: |
3379 次 |
| 最近记录: |