Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SignalR won't use Websocket protocol even though I have the protocol installed in windows 8

I'm using signalr to do some real-time events in my web application. I'm trying to force signalr to use the new websocket protocol but it won't, even if I specify it.

$.connection.hub.start({ transport: 'webSockets' })

I definitely have the web socket protocol installed and I am running Windows 8 with IIS 8.

What else do I need to do to enable web sockets support in signalr?

like image 868
Chev Avatar asked Oct 16 '12 22:10

Chev


People also ask

How do I enable WebSocket protocol?

- In Control Panel, click Programs and Features, and then click Turn Windows features on or off. Expand Internet Information Services, expand World Wide Web Services, expand Application Development Features, and then select WebSocket Protocol. Click OK. Click Close.

Does signal r use WebSockets?

SignalR. ASP.NET Core SignalR is a library that simplifies adding real-time web functionality to apps. It uses WebSockets whenever possible. For most applications, we recommend SignalR over raw WebSockets.

How do I fix my WebSocket connection?

Check that all the Bot Insight services are running. Check that your firewall settings are configured to accept incoming websocket data. Try to use a different web browser. Restart the Bot Insight Visualization and Bot Insight Scheduler services.

How do you use a WebSocket protocol?

In order to communicate using the WebSocket protocol, you need to create a WebSocket object; this will automatically attempt to open the connection to the server. The URL to which to connect; this should be the URL to which the WebSocket server will respond.


2 Answers

Ensure that your app is using the .NET 4.5 assembly from the SignalR package. If the project is targeting 4.0, or it started that way, then nuget would have added a reference to the 4.0 SignalR assembly which doesn't support websockets. If that's the case, then just uninstall and re-install the signalr packages into your project.

like image 143
Damian Edwards Avatar answered Oct 03 '22 17:10

Damian Edwards


Web Sockets requires .NET 4.5.

If you try running it on Windows Server 8 in the future be sure to activate the Web Sockets feature.

like image 36
N. Taylor Mullen Avatar answered Oct 03 '22 16:10

N. Taylor Mullen