

Fix HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure in Asp.net Core
source link: https://codepedia.info/http-error-5025-ancm-out-of-process-startup-failure
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Fix HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure in Asp.net Core
HTTP error 502.5 process failure: Every developer while developing any application, just hate the error screen. It will become a nightmare for the developer if the error message was not useful. Like many of us, Dotnet developers have faced this issue when they are running the Asp.net Core application.
The error message is not much apparent, also this error ANCM Out-Of-Process Startup Failure comes in various scenarios.
I face this error message in two different cases which are as follow:
- Migrating application to Asp.net core 2.2
- Incorrect setting in appsettings.json at LogLevel
Error Screen:
Case 1: Migrating application to Asp.net core 2.2
I have migrated one of my Asp.net core from version 2.1 to Asp.net core 2.2. Well previously same application was running successfully on the local machine, but after migration, it stopped working and gives this error message.
So after a quick research, I figured out the problem is not with the application, but with .NET Core Runtime 2.2.5, which is not installed.
Using the below command in the cmd prompt, you can check which version of .NET CORE Runtime is installed.
dotnet --list-runtimes
Heres list of .net core runtime installed when the error occurs as shown in the below image.
Now after installing .NET Core Runtime 2.2.5 from here and run the same cmd displays the list of all installed version.
As you can see now .NET Core Runtime 2.2.5 is added, which previously not available on the local machine. Now when I run my newly migrated Asp.net core application it runs successfully, and the error got fixed.
Case 2: Incorrect setting in appsettings.json at LogLevel
In asp.net core instead of the web.config we use the appsettings.json file. It's an application configuration file used to store configuration settings such as database connections strings, or any other global variables, also it has a LogLevel setting.
In my case it is set as warn instead of Warning, hence it displays an error message as HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure. By just modifying the appsettings.json file i.e change value to Warning solved this error.
These 2 scenarios I faced and fixed. If you face the same error message for a different reason, pls share it with us will keep updating this.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK