We have an ASP.NET Core application that we recently upgraded to RC2. Before the upgrade, everything was in order, and after the upgrade everything works in Dev and Staging environments, but in Production, the application responds 502 to every request that is not processed by the MVC endpoint:
502 - The web server received an invalid response, acting as a gateway or proxy server. There is a problem with the page you are looking for and cannot be displayed. When the web server (acting as a gateway or proxy) contacted the content server up, it received an incorrect response from the content server.
This means that, for example, https://www.myapp.com/somenonexistingroute returns 502, not 404, and calls to existing endpoints work fine.
The problem is that we use the application in the context of cross-source code, so we need parameter requests (pre-sale requests), and they also respond with 502.
All environments are running Windows Server 2012 with IIS 8.5 and an ASP.NET Core platform handler.
What's happening?
Update
After some additional debugging, we found that this was probably caused by a framework error. We created a github issue
source
share