1

We have two project, one contains Web API built on .net core 2.2.6 and Angular 8 Single Page Application integrated in .net core 2.2.6. We have deployed both on IIS 7, Web API project is working fine but Angular 8 SPA is giving an error "HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure".

Tried multiple Solutions like clearing up node modules, restarting server, deploying on different machine, changing the port number

Please suggest some solution. You help will appreciated.

Ashish Shende
  • 69
  • 1
  • 6

3 Answers3

1

This error usually occurs when trying hosting dotnet core apps in IIS using ASP.NET Core Module with in-process mode. In my case there was conflict between dotnet core Runtime and aspnet core module. First check dotnet core Runtime version be equal with installed Hosting Bundle version on your IIS. Run:

dotnet --info

Look for the section .NET Core runtimes installed on the output. This should be the same with Hosting Bundle that you'v installed. Otherwise try install same .NET Core runtime.

Also other cases has numerated in this (HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure after upgrading to ASP.NET Core 2.2). I'v supposed you know Hosting models for dot net core apps in IIS. See this doc (https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.2)

0
HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure

I got this error when deploying a .net core 2.1 solution on IIS. After using hosting bundle version 2.2.5 and restarting, the website started working. https://dotnet.microsoft.com/download/dotnet-core/thank-you/runtime-aspnetcore-2.2.5-windows-hosting-bundle-installer

To verify that the dll has been added, use the command prompt:

dotnet --list-runtimes

enter image description here

Jim Simson
  • 2,557
  • 3
  • 19
  • 27
0

As you can see based on the answers in this similar question the "HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure" can be caused by a lot of different issues that occur before the app is configured by the startup class. Therefore these issues are hard to catch and log.

In my case it was a permission issue. A quick test you can do is granting read/write/execute access to the application folder to the user "EVERYONE" (make sure to remove this after!). If this works that means you need to grant access to the IIS App Pool using these instructions.

Another common issue is that the runtimes for the version of aspnet core that your app uses is not installed on that server. Try installing the hosting bundle https://dotnet.microsoft.com/download/dotnet-core/thank-you/runtime-aspnetcore-2.2.6-windows-hosting-bundle-installer

Chevyhax
  • 11
  • 2