0

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?

1
  • 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. Commented May 22, 2022 at 17:16

1 Answer 1

0

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.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.