我意识到存在这样的帖子,我已经阅读/重新阅读并且仍然遇到问题。大多数都是旧的或不直接相关的,所以我想我会重新发布一个当前的例子。
试图在 win server 2012 R2 上运行 IIS 8.5+ 的基本站点。此时我被困在“ 502.3 - Bad Gateway ”(错误代码80070002,模块httpPlatformHandler,通知executeRequestHandler,处理程序httpplatformhandler)
相关资料:
- dnx 1.0.0-rc1-final clr (x64)
- IIS - 已安装/验证 HttpPlatformHandler 1.2 已安装 (v1.2.1959)
- IIS - 设置“无托管代码”池/站点
- 在服务器本身上,如果我从命令行直接运行“kestrel.cmd”(通过 dnu 发布生成)并导航到该站点,则可以显示该站点。
- 项目.json:
{
"version": "1.0.0-*",
"dependencies": {
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final"
},
"commands": {
"kestrel": "Microsoft.AspNet.Server.Kestrel"
},
"frameworks": {
"dnx451": {}
},
"publishExclude": [
"node_modules",
"bower_components",
"**.xproj",
"**.user",
"**.vspscc"
],
"exclude": [
"www",
"node_modules",
"bower_components"
],
"scripts": {
"prepublish": [
"npm install",
"bower install"
]
}
}
- dnu 发布后生成的 Web.config:
<configuration>
<system.webServer>
<handlers>
<add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
</handlers>
<httpPlatform processPath="approot\kestrel.cmd" arguments="" stdoutLogEnabled="true" stdoutLogFile="logs\stdout.log" forwardWindowsAuthToken="false" startupTimeLimit="3600"></httpPlatform>
</system.webServer>
</configuration>
非常感谢您的帮助。