HTTP Error 502.5 - ANCM Out-Of-Process Startup Fai

2020-02-23 05:05发布

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.

21条回答
霸刀☆藐视天下
2楼-- · 2020-02-23 05:23

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.

查看更多
一夜七次
3楼-- · 2020-02-23 05:25

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.

查看更多
Emotional °昔
4楼-- · 2020-02-23 05:25

My solution:

  • remove all projects with catalog
  • create new projects
  • copy all files but program.cs and startup.cs
  • manual copying from startup and program classes to new startup.cs and new program.cs

Works.

查看更多
倾城 Initia
5楼-- · 2020-02-23 05:25

Yet another scenario that caused this issue for me:

I am running the app pool identity with a service account and I had to run dotnet dev-certs https under this user to get rid of "System.InvalidOperationException: Unable to configure HTTPS endpoint." during startup.

查看更多
Bombasti
6楼-- · 2020-02-23 05:26

The problem occurs when I try to deploy the asp.net core (out-of-process hosting model) website to windows server 2012r2 IIS in production env. I fixed this with this solution:

Change application pool identity to administrator.

查看更多
趁早两清
7楼-- · 2020-02-23 05:27

Looks like i had the same issue. It's happens because if you don't have global.json file in solution, then VS build(publish) .net core app with the last version that installed on your pc. So, i do the next solution:

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

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

From docs.microsoft.com:

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://docs.microsoft.com/en-us/dotnet/core/versions/selection

查看更多
登录 后发表回答