When I create a new, clean Blazor .NET 6.0 app and start it (using Visual Studio 2022), I see the following error in the browser console:
WebSocket connection to 'ws://localhost:60908/BlazorApp3/' failed: (aspnetcore-browser-refresh.js:234)

Does anyone else have this and any idea if this is a VS2022 bug and how to fix it?
I had exactly the same issue after installing Visual Studio 2022. I tried to "Enable WebSocket Protocol" but that didn't work. However, the fix for me was to change Script Debugging to "Enabled".
Hopefully, this can help you too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With