azure-web-app-servicehttp-status-code-500

azure error 502 - Web server received an invalid response while acting as a gateway or proxy server


I'm trying to host an azure website and tried troubleshooting for a few hours, but still keep getting the same error 502 Web server received an invalid response while acting as a gateway or proxy server.

I tried enabling logging errors on azure, but all it gives me are 404 not found errorssee error log


Solution

  • 502 errors won't be visible in your IIS logs because they are returned by the front end server which basically fowards the requests to the worker hosting your site and there are many reasons why the front end can return 502 error.

    Please follow https://azure.microsoft.com/en-in/documentation/articles/app-service-web-troubleshoot-http-502-http-503/ to troubleshoot the issue and see if you can identify which one you are running into