服务器前提条件:

1、IIS7.5及以上

2、.net framework 4.5及以上

3、应用程序的托管管道模式必须为集成模式

关于.NET WebSocket connection to 'ws://xxx' failed: Error during WebSocket handshake: Unexpected response code: 200

 

4、需要开启websocket协议

 

关于.NET WebSocket connection to 'ws://xxx' failed: Error during WebSocket handshake: Unexpected response code: 200

 

请在 Web.config 中设置以下配置开关:

 

<system.web>
  <httpRuntime targetFramework="4.5" />
</system.web>

 

相关文章: