aspnet5 vNext (rc1) iis 8 - bad gateway 502.3

时光总嘲笑我的痴心妄想 提交于 2020-01-14 09:23:28

问题


I realize posts like this exist, I've read/re-read and am still having issues. Most are old or not directly related and so I thought I'd re-post w/a current example.

Trying to get a basic site running in IIS 8.5+ on win server 2012 R2. At this point I'm stuck at "502.3 - Bad Gateway" (error code 80070002, module httpPlatformHandler, notification executeRequestHandler, handler httpplatformhandler)

Relevant info:

  • dnx 1.0.0-rc1-final clr (x64)
  • IIS - installed/verified HttpPlatformHandler 1.2 is installed (v1.2.1959)
  • IIS - setup a "No Managed Code" pool/site
  • On the server itself I can get the site to show up if i run the "kestrel.cmd" (generated via dnu publish) directly, from the command line and navigate to the site.
    • Project.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"
    ]
  }
}
  • Web.config generated after dnu publish:
<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>

Your help is much appreciated.


回答1:


I was getting the same issue - iis 8 - bad gateway 502.3.

I went to Turn Windows Features On or Off and enabled IIS.

I cleaned and rebuild the solution and it ran like a charm.

I hope it helps you too.



来源:https://stackoverflow.com/questions/34098155/aspnet5-vnext-rc1-iis-8-bad-gateway-502-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!