Is Visual Studio's Browser Link feature able to use web sockets?

后端 未结 1 1113
余生分开走
余生分开走 2021-01-11 16:33

I understand that SignalR is used to communicate with client browsers using the injected artery script. I have what seems to be a common problem, which is that my browser\'

相关标签:
1条回答
  • 2021-01-11 16:55

    Short answer

    Browser Link will only use WebSockets on Windows 8 or Windows Server 2012

    Longer answer

    The following would explain the issue if you're using Visual Studio on Windows 7, Windows Vista or Windows Server 2008:

    IIS (Express) depends on the .NET framework implementation in System.Net.WebSockets to handle WebSocket connections; as you can read in the link to MSDN, you simply don't get an actual implementation of the necessary classes when you install .NET 4.5 on Windows 7.

    So in that case, the server can't agree to the client's request to change from standard HTTP to the WebSocket protocol, which forces the SignalR client to use one of the fallback options (in your case: long-polling).

    0 讨论(0)
提交回复
热议问题