I'm new to websocket.. first, I installed signalR and added 'using Microsoft.AspNet.SignalR.WebSockets;' in the code behind.. second, I tried to make websocket connection to my site on the client side, but at run time there's the following error: WebSocket connection to 'ws://localhost:4653/showDiagrams.aspx/' failed: Error during WebSocket handshake: Unexpected response code: 200.. does somebody know how to help me?
- AFAIK, build-in websockets only works on Windows 8 or higher. For windows 7 and below, you should use a 3rd party library. (like fleck github.com/statianzo/Fleck)Jeroen van Langen– Jeroen van Langen2015-06-22 20:45:10 +00:00Commented Jun 22, 2015 at 20:45
- ok..but if I installed signalR, then i'm able to use websocket, no?Adi Malachi– Adi Malachi2015-06-23 19:30:45 +00:00Commented Jun 23, 2015 at 19:30
Add a comment |
1 Answer
This is not how SignalR works. It is not about installing a SignalR package and then being able to get any aspx page with websockets. SignalR is about creating a communication channel between the server and the client you could use to exchange data/messages and not to load web pages. I would recommend reading this introduction to SignalR: http://www.asp.net/signalr/overview/getting-started/introduction-to-signalr.