Azure 502.5 error with ASP.NET Core 2.1
August 23, 2018 - Søren Alsbjerg HørupI recently updated the .NET Core version of one of my ASP.NET Core project from 2.0 to 2.1. To my surprise, the application failed to start after publishing to Azure with a 502.5 error thrown at my face.
Investigation showed that the target version of .NET Core i was using was not avaliable on the App Service instance I was targeting.
To fix this, I changed my Publish configuration from Framework-dependent to Self-contained.
This change will deploy the complete framework alongside my application with the downside that:
- Deployment takes a bit longer due to the framework needs to be deployed.
- I need to manage the framework alongside my app, e.g. update it if security bugs or similar are found in the framework.
In any case, this allows me to deploy 2.1 applications to Azure until 2.1 is properly deployed as part of the infrastructure.