Score:0

Blazor Server App: HTTP Error 500.31 - Failed to load ASP.NET Core runtime

us flag

I created a Blazor Server App targetting .NET 5 on a workstation having Windows 10. I used Visual Studio 2019 Community Edition to create the basic Blazor Server Template app.

The app works fine when debugged on the development machine (Windows 10).

I have a web server running Windows Server 2019 and having IIS and .Net Framework 4.7 selected.

I installed .NET6 hosting bundle on the server

I restarted the server and hosted the app in C:/inetpub/wwwroot/ and configured IIS to use CLR version 4 Integrated pool.

When I tried to view the application from the browser I get the error:

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

I even tried to install .NET 5 runtime on the server but that did not help. the same error kept showing.

I tried to build the blazor app targeting .NET Core 3.1 but the same error kept showing.

What am I doing wrong?

Lex Li avatar
vn flag
Open Windows event log to see what exactly was logged when 500.31 error page was displayed. Those log entries contain more information to guide you.
Score:0
ph flag

your debug and production environment should have the same versions of Windows, .NET and so on. it seems your problem is due to some dll not found in production environment, to fix it, is suggested to see system event log and to enable and check also IIS log, and see the type of error, that would help you to see more detail.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.