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

人盡茶涼 提交于 2019-12-30 21:11:07

问题


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?


回答1:


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.




回答2:


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.




回答3:


If you are already using framework 4.5 but still no luck, add an HTTPS binding to your IIS website and access the website over HTTPS.



来源:https://stackoverflow.com/questions/12924607/signalr-wont-use-websocket-protocol-even-though-i-have-the-protocol-installed-i

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!