SignalR with Web Sockets

后端 未结 4 744
耶瑟儿~
耶瑟儿~ 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:36

    Even on Windows 8 / .NET 4.5 it was not working initially, but with these additional tips I finally got it working.

    • Install websocket support

      -> Turn Windows features on or off
      -> Internet Information Services 
      -> World Wide Web Services 
      -> Application Development Features 
      -> WebSocket Protocol
      
    • in web.config, under appSettings, add this setting:

      
      

    SignalR automatically negotiates websockets, it does not have to be specified and nothing special is needed in code.

提交回复
热议问题