1
votes

I can publish dotnet core projects which I created a month ago, but newly created projects seem to be broken when visited after publishing. I can't publish new projects to either new or older webapps, however older projects can publish to either. So it seems the issue is with dotnet core and not azure...

Steps to reproduce:

  • Create a new DotNet Core Project (newly created 2.0, 1.1, and 1.0 versions are all failing for me with both MVC and Empty templates... Haven't tried others).
  • Attempt to publish to Azure WebApp using the publish profile.

The error I'm seeing in the azure Log Stream is:

HTTP Error 502.5 - Bad Gateway

The specified CGI application encountered an error and the server terminated the process. Most likely causes:
  • The CGI application did not return a valid set of HTTP errors.
  • A server acting as a proxy or gateway was unable to process the request due to an error in a parent gateway.

Things you can try:

  • Use DebugDiag to troubleshoot the CGI application.
  • Determine if a proxy or gateway is responsible for this error.
1

1 Answers

1
votes

So it turned out all I had to do was publish with the Settings > File Publish Options > "Remove additional files at destination" option checked.