blazorblazor-server-side.net-6.0visual-studio-2022

.NET 6.0 Blazor Server app: WebSocket connection to 'ws://localhost:60908/BlazorApp1/' failed


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)

Error in browser console

Does anyone else have this and any idea if this is a VS2022 bug and how to fix it?


Solution

  • The same issue has been discussed here https://developercommunity2.visualstudio.com/t/WebSocket-connection-to-wss:-fail/1670519?q=ERR_CONNECTION_RESET&ftype=problem&space=8&stateGroup=active&sort=newest and the fix is available with VS 17.2 Preview 2.1