chevron_left
1,680 points
10 5 2

HTTP Error 500.31 - Failed To Load Asp.net Core Runtime
Photo by Larisa-K

This programming error is related to the ASP.Net, where a user can face a runtime loading issue of the language and gets a message displayed on the screen like ‘HTTP Error 500.31: Failed To Load Asp.net Core Runtime’. It causes because not installing the required runtime, missing some important files, specific paths, and the compatible version of the .NET Core. It is not too difficult to find out the solution, just install and run the suitable required versions to get the error fixed.

Error Briefing  #

The error occurs when you try to load ASP.Net Core Runtime, and you get the result in the form of a problem. The HTTP error 500.31 stops you to work on ASP.Net until you install a proper runtime. There are versions available that can help you to load .NET Core properly. But missing IIS, DLL, and the Hosting Bundle are problematic for you. 

Causes Of Happening The Error  #

Many software and languages got error messages while executing multiple runtime commands, and you face the error messages. When you face an error called Http Error 500.31 - Failed To Load Asp.net Core Runtime means you are facing a problem during the ASP.Net loading. There are easy ways to find out the solution for this issue, discuss ahead. If you are hosting a web app that needs to be built on ASP.Net Core to IIS on Windows 10. You will face the issue while navigating to landing pages of an application, and if the recommended version of Microsoft.NetCore.App or Microsoft.AspNetCore.App that is not available in Windows will also generate the same error. You will be displayed an error in the following form;

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

Common solutions to this issue:

Microsoft.NetCore.App or Microsoft.AspNetCore.App versions not found.

Troubleshooting steps:

Check error messages from the system log

Enable logging the application process' stdout messages

The application process needs a debugger

For more information visit: https://go.microsoft.com/fwlink/?LinkID=2028526

Process To Solve  #

There are different ways to solve this error if you keep in mind to access and load the proper files. Some common solution steps are as under;

•          Check error messages for system log events

•          Log on to the app’s stdout message

•          Link a debugger with the app process and check

You can consult the website below as well.

This error will no longer if you have installed a .NET Core runtime. To check on your system whether is it installed or not you can run this code in the command prompt;

dotnet --info

It will show you the result whether .NET Core 5.0 x is installed on your system or not. You must ensure that the .NET Runtime is using the 3.1 or 5.0 x version for Microsoft.AspNetCore.App and Microsoft.NETCore.App according to your requirement. Check if your Xtraction version is different from these then you may need one to install. Additionally, .NET Runtime and Windows Server Hosting may differ, if so then you will get the app behavior like this;

 Microsoft .NET 5.0.10 - Windows Server Host

 Microsoft .NET Runtime - 5.0.17

Information: you can directly download .Net Core Runtimes from Microsoft

Xtraction 2021.4 to 2022.2 needs .NET Core version 5.0 x, and wouldn’t work if you have.NET Core version 6.x

Another way to solve the error is to apply the following steps;

•          App pool has permission to approach a published app folder physically

•          Manage app mode

•          Runtimes and Window Server Hosting should be the same

If the application pool doesn’t have an access to the application folder, you can face the error, by setting the app mode you can stay away from the error. A server hosting for windows must be matched with the .NET Core Runtime versions if not it will not work and will create an error.  

There is a simple command that might help you to check whether the .NET Core versions loaded on the machine or are unavailable. Run the following command.

run -> cmd -> dotnet --info

Http Error 500.31 can be resolved once you install Hosting Bundle from .Net Core 3.1

You also can find the solution allowing permission to the app pool to access the site folder.

Check the version is 3.1 of the Hosting Bundle for IIS, if it is missing then you will confront the error, so click on the hosting button to get the correct installer. Get the hosting bundle for any .NET version. You have two different options to stop errors like this Http Error 500.31 - Failed To Load Asp.net Core Runtime, and you can use both version 3.1 and 5.0x. To resolve the problem, you have to check all the DLLs deployed on the server, if DLL is missing, upload it to avoid the error. Sometimes you can resolve the issue if you recycle the application pool.

If you convert the location to Win-x86 it works properly but if you have Win-x64 then you will face the problem as it doesn’t work. You have to check also;

• check dotnet on IIS server

• checking Dotnet info on the build server

In the Advance Setting of Application Pool, you will find Enable 32-Bit Applications, which is considered by the IIS as false but must be True, so check the setting before you go rather than meet the error.

The Conclusion  #

The above article covers all aspects of the HTTP Error 500.31 - Failed To Load Asp.net Core Runtime, the way it happens, and the behavior to resolve. It occurs when you have some important file missing in your project, if you avoid those missing entities and deploy them as proper as they must be then you will not face the issue. Also, check the available .NET Core Runtime versions suitable to work properly.

References  #

HTTP Error

I vanti Community

DotNet Core deployment

Troubleshoot ASP.NET Core

HTTP error 500.31

Technote

Exchangetuts

If you read this far, tweet to the author to show them you care. Tweet a Thanks

More Posts

Importerror: DLL load failed: Error in Python Ankur Ranpariya - Sep 6
Numpy.core.multiarray failed to import windows amr12345a - Jun 10
Failed to load resource: the server responded with a status of 404 (not found) Ankur Ranpariya - Sep 18
Failed to load resource: the server responded with a status of 400 (bad request) zhteja - Sep 17
Java.lang.illegalstateexception: failed to load applicationcontext Ankur Ranpariya 1 - Aug 15
Failed To Decode Response zlib_decode() Data Error zhteja - Sep 22
User Identity Name Is Blank zhteja - Sep 16
A field initializer cannot reference the nonstatic field, method, or property zhteja - Sep 9
The outputpath property is not set for project zhteja - Sep 8
Python selenium wait for page to load. Bushra Rubab - Sep 26
Unable to load VirtualBox engine zhteja - Jul 4
Failed to launch the python process, please validate the path 'python' beekip - Sep 20
Nginx.service: failed to parse pid from file /run/nginx.pid: invalid argument NoirHusky - Sep 3
Arithmetic overflow error converting 'int' to data type 'numeric'. Bushra Rubab - Sep 19
Value Error: Need More Than (0) Values To Unpack zhteja - Sep 15
How to solve error: converting data type 'varchar' to 'numeric'? Bushra Rubab - Sep 11
Uncaught error: expected the reducer to be a function. zhteja - Jun 22
HOWTO: Create articles on kodlogs.net with Markdown Max Wu - Sep 7
Response for preflight does not have HTTP ok status. zhteja - Jul 26
Make the code wait for page load in python amr12345a - Jun 5