Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure after upgrading to ASP.NET Core 2.2

After upgrading my project to ASP.NET Core 2.2, I tried to run the application (locally of course) and the browser displayed an error message like in the below screenshot.

enter image description here

no more errors notified by visual studio error explorer. I don't know what's happen.

like image 240
TheBatman94 Avatar asked Feb 18 '19 21:02

TheBatman94


People also ask

What is HTTP Error 502.5 ANCM out of process startup failure?

HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure (Windows Server) The main cause for this problem is not having previously installed the . NET Core Runtime 2.2 (download it here). Although this is the main cause, there are several other factors that may cause this issue.

What is ANCM?

The ASP.NET Core Module (ANCM) is a native IIS module that plugs into the IIS pipeline, allowing ASP.NET Core applications to work with IIS. Run ASP.NET Core apps with IIS by either: Hosting an ASP.NET Core app inside of the IIS worker process ( w3wp.exe ), called the in-process hosting model.


2 Answers

In my case, I upgraded some nuget packages to net core 2.2, but I did not have the net core 2.2 sdk installed, so I went to net core website to download the latest sdk or runtime package, and then I did a net stop was /y and then a net start w3svc in the CMD as administrator. Problem solved for me.

like image 74
Alejandro Bastidas Avatar answered Sep 20 '22 18:09

Alejandro Bastidas


I ran into this issue and had a different solution. For me it was that I had a package that was out of date with the application (I had updated it on NuGet, and the library hadn't been replaced in production). Updating the package fixed it for me.

Note with this: I had to manually run dotnet.exe with the project dll in order to see the message that fixed it for me.

Hope this helps someone else down the road.

like image 36
Zulukas Avatar answered Sep 18 '22 18:09

Zulukas