Programming in recent times now requires little or no effort as everything has been simplified. However random bugs and glitches can pop its head anytime and cause an error. This article will be discussing the “http error 502.5 – ancm out-of-process startup failure”; causes, and possible solutions to fix the error.
What causes the “http error 502.5 – ancm out-of-process startup failure”?
There are different reasons for this error:
- The application process has failed to start.
- The application process started but crashed halfway.
- The application process started but failed to listen on the configured port.
- You may receive the error when you try to access the website especially after installing or updating the system.
- Some developers have also faced this issue when they are running the Asp.net Core application.
How to fix “http error 502.5 – ancm out-of-process startup failure”
#1. Install the required .NET Core version
The first thing you need to try out is to install the required .NET Core version into the system. If the app you’re running targets a .NET Core version that you have not installed on the machine, it can cause a crash leading to the “http error 502.5 – ancm out-of-process startup failure” error at runtime.
To avoid this error, make sure you have the required .NET Core framework installed. Firstly, find out the specific version of .NET Core that the app you’re running targets. Then install the required runtime version.
Run the following command on a command prompt or Powershell To check that the .NET Core Runtime 2.2 is installed
The output should list or contain three entries with version 2.2.x, example:
Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
After installing .NET Core Runtime 2.2.5, then run the same CMD to display the list of all installed versions.
#2. Use self-contained deployment
When you use the self-contained deployment method when publishing or deploying an app, you will be packaging all the dependencies your app requires into one deployment package. These dependencies, also known as deployment artefacts, keeps your app from running into basic runtime issues when launched on a different system or deployed in the field.
#3. Correct the incorrect setting in appsettings.json at LogLevel
Just modify the appsettings.json file because using the web.config file In Asp.net core for configuration instead of the appsettings.json file caused the error. This is an application configuration file used to store configuration settings like database connection strings, or any other global variables, also we configure the LogLevel setting here.
These few hacks will definitely help you solve the “
http error 502.5 – ancm out-of-process startup failure”. You can now do your programming error free.