Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm trying to publish my MVC 6 Beta 8 app. I was able to successfully publish it to Azure, but when I try to publish it to ASPHostPortal, I'm getting 500 error.

So I tried to publish the app to a local IIS and also failed. First, I figured out that I need to install HttpPlatformHandler (otherwise IIS was not able to load web.config). But even after that, I'm getting 502.3 error.

HTTP Error 502.3 - Bad Gateway
There was a connection error while trying to route the request.

enter image description here

Also in Event Log I can see an error 1000 from HttpPlatformHandler with no description. But it says "Process '0' failed to start. Port = 13679, Error Code = '-2147024894'."

stdout.log is created but is empty.

Here is my web.config:

<configuration>
  <system.webServer>
    <handlers>
      <add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/>
    </handlers>
    <httpPlatform processPath="..approotweb.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>

Where do I go from here?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
583 views
Welcome To Ask or Share your Answers For Others

1 Answer

Thanks to Daniel's comment and https://github.com/aspnet/Hosting/issues/364 I figured out that HttpPlatformHandler 1.0 that I installed via Web Platform Installer does not support relative paths. So I installed HttpPlatformHandler 1.2 and now it works!!

The alternative solution (also worked for me) was to use full paths in httpPlatform configuration instead of relative paths.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...