Blazor error: The hash algorithm must be one of 'sha256', 'sha384', or 'sha512', followed by a '-' character

Viewed 1576

My Blazor WebAssembly standalone (not hosted) app works fine locally running in Visual Studio but when I deploy to a Windows server - IIS the app doesn't load within the browser and this is showing in the console: enter image description here

I also see in the network panel it is making a request to the server for: https://{myDomain}/_framework/undefined A file that doesn't exist, so it's just returning the index.html content.

I have tried deleting everything and deploying a 2nd time and also tried restarting the website in IIS but it doesn't help.

2 Answers

So I found the problem, in Visual Studio when you publish the Blazor app I had Target Runtime set as Win-x64, when I changed it to browser-wasm everything is OK.

Actually it is not "Target Framework" it's "Target Runtime". enter image description here

You confused me for a bit. This is why I'm posting. If you have a time please update your post, for others. Thank you. Your post helped me.

Related