Skip to content
This repository has been archived by the owner on Nov 1, 2018. It is now read-only.

ASP.NET Core 2.1.1 fails with HTTP Error 502.5 - Process Failure #945

Closed
epozsh opened this issue Jun 20, 2018 · 23 comments
Closed

ASP.NET Core 2.1.1 fails with HTTP Error 502.5 - Process Failure #945

epozsh opened this issue Jun 20, 2018 · 23 comments

Comments

@epozsh
Copy link

epozsh commented Jun 20, 2018

Hello,
After upgarding my project from .NET CORE 2.0 to .NET CORE 2.1, and upgraded all microsoft packages to 2.1.1. With updated visual studio to 15.7.4, .NET CORE 2.1 sdk(V2.1.3) and .NET CORE 2.1 runtime(V2.1.1) installed i am getting this error when i try run my app.
scr

@Tratcher
Copy link
Member

Please follow the troubleshooting steps and let us know if you still have an issue:
https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/troubleshoot?view=aspnetcore-2.1#app-startup-errors

@ColorTwist
Copy link

I had the same exact issue.
Version v2.1.301 should fix that (Previously had v2.1.300) .

@coder8keyboard
Copy link

coder8keyboard commented Jul 25, 2018

-Open Command Prompt
-Navigate to bin directory of your project. Let's assume your project name is 'test'
-Run 'dotnet .\test.dll' and you will see something like Microsoft.Aspnetcore.all version 2.1.2 was not found.
-Then run 'dotnet -info' and you will see your .netcore runtime. Mine was 2.1.1.
So I downgraded my Microsoft.Aspnetcore.all nuget package to 2.1.1 and it worked after.
Alternatively, you could upgrade .netcore runtime but that's more work :)
The error on web browser and events log is useless. Can't wait for .netcore 3 :P

@jaredfholgate
Copy link

I had the same issue after installing the hosting package. The fix was much simpler for me. Just running IISRESET resolved it.

@mynkow
Copy link

mynkow commented Sep 9, 2018

I added the following line in the csproj and it started working. All troubleshoots suggested by @Tratcher did not help me at all because of misleading information

<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.0" PrivateAssets="All" />

@jawaidakhter
Copy link

I just update my dotnet sdk core version in global.json file with installed dot net version, and my project start working

C:>dotnet --version
2.1.402

global.json

{
"sdk": {
"version": "2.1.402"
}
}

@JashanChittesh
Copy link

JashanChittesh commented Sep 16, 2018

-Open Command Prompt
-Navigate to bin directory of your project. Let's assume your project name is 'test'
-Run 'dotnet .\test.dll' and you will see something like Microsoft.Aspnetcore.all version 2.1.2 was not found.
-Then run 'dotnet -info' and you will see your .netcore runtime. Mine was 2.1.1.
So I downgraded my Microsoft.Aspnetcore.all nuget package to 2.1.1 and it worked after.
Alternatively, you could upgrade .netcore runtime but that's more work :)
The error on web browser and events log is useless. Can't wait for .netcore 3 :P

This answer is really helpful - only "Run 'dotnet .\test.dll'" should be "Run 'dotnet .\NameOfYourMainApplication.dll'" (obviously "NameOfYourMainApplication" is a placeholder for the name of your application DLL ;-)

Also, I personally found it easier to upgrade the .netcore runtime than doing another build and uploading it to my server. I guess after each Visual Studio update, you should probably check this URL and upgrade your server, if a new version is available: .NET Core 2.1 downloads

Eventually, you'll move to .NET Core 2.2 and that's simply "2.2" at the end of the URL: https://www.microsoft.com/net/download/dotnet-core/2.2

I'm leaving this here for others and my future self when I run into a broken Web app update process during the next crunch mode when the last thing I have time for is following useless "troubleshooting" guides.

PS: Ah, even better is this URL:

.NET download archives (https://www.microsoft.com/net/download/archives)

@estomagordo
Copy link

estomagordo commented Sep 18, 2018

This happens for me when I create a new .NET Core Web project with AngularJS and publish to Azure. All else I have done is to add Application Insights.

The site loads like it should in IIS Express with Chrome (IE does not work, don't know why).

2.1.402

@rpawlaszek
Copy link

@estomagordo have you tried the self-contained deployment? This worked for me.

@estomagordo
Copy link

@rpawlaszek yes, eventually I noticed someone mentioned this. And it worked. Thanks.

@amilathennakoon
Copy link

Downgrade nuget Microsoft.AspNetCore.All to 2.1

image

@adamcweitzman
Copy link

Happens for me when on a .NET Core Web / Angular 6 App

Runs locally just fine, getting the 502.5 of death when I publish, here's what I've tried:

  1. rolling all nuget .net versions back to 2.1.1
  2. using self contained deployment

trying to read through to see if i missed something...

@adamcweitzman
Copy link

In the release folder:

      "Microsoft.AspNetCore": "2.1.1",
      "Microsoft.AspNetCore.All": "2.1.1",
      "Microsoft.AspNetCore.App": "2.1.1",
      "Microsoft.EntityFrameworkCore": "2.1.4",
      "Microsoft.EntityFrameworkCore.Tools": "2.1.4",
      "Microsoft.NETCore.App": "2.1.0",

Could the last line be throwing it off? If so, how to update? the package is blocked by nuget

@rpawlaszek
Copy link

@adamcweitzman, could you check your nuget version?

@adamcweitzman
Copy link

yes, copy and paste of the nugget:

sdfdsf

@adamcweitzman
Copy link

maybe i need to manually set the path? in my runtime.config in \bin I still have the correct version

@rpawlaszek
Copy link

I meant the version of nuget you use. I had no problem with installing the 2.1.5 version of Microsoft.AspNetCore.App. Go to powershell and simply type in 'nuget'

@adamcweitzman
Copy link

4.6.0

@adamcweitzman
Copy link

the app service running the site is 2.1.403 any idea how to roll that back?

@rpawlaszek
Copy link

The version I have installed is 4.8.1 Could you try with this one? And another thing: what is the environment you have set for the self-contained deployment? (mine: win-x86)

@kbdavis07
Copy link

Got same error on a VM hosted on Azure with IIS, the self-contained deployment seems to fix this issue for me for now.

@Pete1138
Copy link

Pete1138 commented Oct 30, 2018

I deployed an app to IIS in an Azure VM (which worked), came back to it after a few hours and it started showing this error.
-Run 'dotnet .\test.dll' spins up the app fine (no errors).
rolling back to 2.1.1 and self-contained deployment has not fixed this for me.

@BoxTwenty
Copy link

I had the same issue!

The dotnet Core version of Visual Studio and server didn't match.

This solution also works:
When deploying, I just changed the Deployment Mode to "Self.Contained". This way your bin files will be larger, you have to choose a target Runtime and it can't be "portable". But it works!

Hope it helps

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests