DotNet Core deployment IIS: http error 500.31 - failed to load asp.net core runtime

I'm trying to host a Web application built on top of ASP.NET Core to IIS on a Windows 10 machine. I received the following error when I tried to navigate to the default landing page of the application: 

HTTP Error 500.31 - Failed to load ASP.NET Core runtime

"HTTP Error 500.31 - Failed to load ASP.NET Core runtime
Common solutions to this issue:
The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.
Troubleshooting steps:
Check the system event log for error messages
Enable logging the application process' stdout messages
Attach a debugger to the application process and inspect
For more information visit: https://go.microsoft.com/fwlink/?LinkID=2028526
http error 500.31 - failed to load asp.net core runtime, failed to load asp.net core runtime, http error 500.31 - failed to load asp.net core runtime in iis, 500.31 - failed to load asp.net core runtime, http error 500.31 - failed to load asp.net core runtime visual studio 2022, error 500.31 - failed to load asp.net core runtime, http error 500.31 failed to load asp.net core runtime, http error 500.31 - failed to load asp.net core runtime iis, iis http error 500.31 - failed to load asp.net core runtime, 500.31 failed to load asp.net core runtime, failed to load asp.net core runtime iis, http error 500.31 - failed to load asp.net core runtime .net 6, iis failed to load asp.net core runtime, http error 500.31 - failed to load asp.net core runtime 5.0, 500.31 .net core iis

To resolve this issue, I applied the following steps:

  • I checked if the application pool has the right permissions to access the physical folder where the application is published
  • I made sure the managed pipeline mode of the application pool is integrated as per the following screenshot:

  • I checked the version of the hosting bundle, the version of the Windows Server Hosting and the Runtime should match:
    • Microsoft .NET 5.0.11 - Windows Server Hosting
    • Microsoft .NET SDK 5.*.*
    • Microsoft .NET Runtime - 5.0.11

In order to check these versions, you can run the following command in the command prompt: run -> cmd -> dotnet --info

Running this command will display the version of the installed runtimes:

HTTP Error 500.31 - Failed to load ASP.NET Core runtime, failed to load asp.net core runtime

Read also: Top ASP.NET MVC Interview Questions for a Senior Position - Part 1

Post a Comment

Previous Post Next Post