SignalR with Web Sockets

后端 未结 4 745
耶瑟儿~
耶瑟儿~ 2020-12-08 06:56

I am attempting to get websockets working in my dev environment:

  • Visual Studio 2010
  • Windows 7
  • Signal R 0.51
  • Latest Chrome / Firefox<
4条回答
  •  广开言路
    2020-12-08 07:38

    Based on this answer https://stackoverflow.com/a/9135334/700926 you will see that WebSocket support in SignalR relies on Windows 8 / IIS8 - the answer also points to a wiki page at SignalR's github page, however, that page does not exists anymore.

    But, by cloning the wiki repo at github and go back some revisions you will see the documentation of the SignalR.WebSockets project which according to SignalR's github page, does not exist anymore - (which might explain why the wiki site is removed) - however, in a revision of the wikipage for SignalR.WebSockets from February this year, it stated that:

    The SignalR.WebSockets package can be added to an existing SignalR project to allow clients to connect using the WebSocket protocol. The SignalR jQuery client will automatically attempt to connect via WebSockets (if the browser supports it) so no changes are necessary on the client side to add WebSockets to your SignalR based application.

    SignalR.WebSockets relies on Microsoft.WebSockets in order to listen for incoming WebSocket connections from within ASP.NET. This package in turn depends on the new WebSockets support that was added to ASP.NET 4.5 and IIS 8.0. As a result, the SignalR.WebSockets package will only work on a Windows 8 machine (.NET 4.5 will install on earlier versions of Windows but Windows 8 is required for IIS 8.0). For more information on how to setup a Windows 8 machine (using the developer preview) see here.

    I have tried searching for newer information than what I have been able to provide above, but as far as I can tell, the SignalR wiki does not cover this topic explicitly in its current version.

提交回复
热议问题