9

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="..\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>

Where do I go from here?

Sergey Kandaurov
  • 2,626
  • 3
  • 24
  • 35
  • http://docs.asp.net/en/1.0.0-beta8/publishing/iis.html – Sirwan Afifi Oct 21 '15 at 09:46
  • Off course I did all this, but have this error. This article still mentions WebListener, which no longer exists in MVC6 Beta 8. The article was not updated to Beta 8. – Sergey Kandaurov Oct 21 '15 at 09:53
  • There are Azure/IIS related comments in the thread with [questions and issues](https://github.com/aspnet/Hosting/issues/364) regarding the beta8 updates. They might help – Daniel J.G. Oct 21 '15 at 11:13
  • Thanks! This thread actually contained a hint to the solution! – Sergey Kandaurov Oct 21 '15 at 11:22
  • I ran this problem too, in a RC version. Plz see my comments and check if it helps: https://github.com/aspnet/Hosting/issues/466#issuecomment-168372853 – Jijie Chen Jan 02 '16 at 08:45

1 Answers1

6

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.

Sergey Kandaurov
  • 2,626
  • 3
  • 24
  • 35
  • Do you happen to know if you can point iis to your vs.net solutions wwwroot without publishing so that you make changes etc and see them in the browser. I've been looking around and everyone keeps stating that you need to publish the project. Is publishing always required? I'm used to having IIS point to my vs.net solution and debuging with that. – DotnetShadow Oct 22 '15 at 07:33
  • Never tried myself (why if you can use IISExpress or dnx web), but theoretically it may work if you try to "fake" publish by changing paths web.config – Sergey Kandaurov Oct 22 '15 at 11:54
  • Thanks for replying. The only reason I'm asking is that I used to use IIS previously for development and wanted to see if I still could. How do you fake publish? – DotnetShadow Oct 22 '15 at 21:18