'Running razor pages hosted, blazor web assembly, application on IIS 10

I have created a razor pages application which hosts several blazor wasm components on various pages. It runs perfectly okay in visual studio with no errors reported in the browser developer tools console, but when I uploaded the published application to a new aws ec2 instance, it returns a 500 error. Is this a .net core, IIS or AWS problem, please?



Solution 1:[1]

I had a problem with new AWS instances running plain old razor pages applications. Did you install the .Net core hosting bundle?

https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-6.0.3-windows-hosting-bundle-installer

It fixed my 500s straight away.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 sanepete