ASP.NET Core app doesn't work: "500.31 - Failed to load ASP.NET Core runtime"

Started by mahesh, Jan 28, 2025, 07:50 AM

Previous topic - Next topic

mahesh

Question
ASP.NET Core app doesn't work: "500.31 - Failed to load ASP.NET Core runtime" or "502.5 - Process Failure"
Symptoms
  • An ASP.NET Core application shows an error in the browser
HTTP Error 500.31 - Failed to load ASP.NET Core runtime

HTTP Error 502.5 - Process Failure

  • Running the application manually fails with a message about a missing framework
"C:\Program Files\dotnet\dotnet.exe" %plesk_vhosts%\example.com\httpdocs\mytestapp.dll
It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '2.2.0' was not found.
  • The command dotnet --info shows that the .NET Core version from the error is not installed
Cause
The application requires a runtime version that is not installed on the system.

Resolution
  • Connect to the server via RDP
  • Install the runtime version required by the app (or an SDK that includes it): .NET Core downloads