Error during Websocket Handshake - Bug Fix for a React App with SignalR

Published: 24 January 2020
on channel: Round The Code
17,146
37

I integrated SignalR with my React app and found that sometimes the SignalR connection worked, and sometimes it didn't.

I was unable establish a connection between my React app and SignalR on a regular basis. I was getting the following error in my browser's development tools:

WebSocket connection to 'ws://localhost:44357/sockjs-node' failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET

In this video, I will show you how the React app is trying to use WebSocket to connect to the WebpackDevServer and that it was using the non-secure ws protocol when trying to establish this WebSocket connection.

In addition, I will also show you how I went about using the secure wss protocol when using the WebSocket connection to resolve this issue.

📖 Learn .NET and C# with our online courses 📖
https://www.roundthecode.com/dotnet-c...

► More Information: https://www.roundthecode.com/dotnet-t...

#react #signalr


Watch video Error during Websocket Handshake - Bug Fix for a React App with SignalR online without registration, duration hours minute second in high quality. This video was added by user Round The Code 24 January 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 17,146 once and liked it 37 people.