Tig2810
Tig2810

Reputation: 169

HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure - .net core 2.2

Receiving error "HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure" when deploying to hosted provider's IIS. Works fine locally and worked fine until recently . My dotnet version is 2.2.300.

Is there any type of logs/info that I can request to find out the root cause of the issue?

Upvotes: 2

Views: 4069

Answers (3)

Felix Too
Felix Too

Reputation: 11932

To troubleshoot, you can run dotnet command against deployed dll in the hosting machine.enter image description here

> dotnet MyDllxxx.Web.dll

If the issue is a missing expected version as shown on the screenshot, you can then download the correct version and try again.

Upvotes: 2

Andrey Ravkov
Andrey Ravkov

Reputation: 1484

add a global.json file with .net core version.

{
   "sdk": {
      "version": "2.2.402"
   }
}

global.json can be placed anywhere in the file hierarchy. The CLI searches upward from the project directory for the first global.json it finds. You control which projects a given global.json applies to by its place in the file system. The .NET CLI searches for a global.json file iteratively navigating the path upward from the current working directory. The first global.json file found specifies the version used. If that version is installed, that version is used. If the SDK specified in the global.json is not found, the .NET CLI rolls forward to the latest SDK installed. Roll-forward is the same as the default behavior, when no global.json file is found.

https://learn.microsoft.com/en-us/dotnet/core/versions/selection

Upvotes: 0

Sudhakar Datt
Sudhakar Datt

Reputation: 1

Check if you are targeting multiple version of the .NET SDK in your projects, Make sure to target .NET 2.2 and rebuild, it will solve the issue.

Also make sure go to NuGet Manager for Solution and consolidate all dependencies.

Upvotes: 0

Related Questions