kerryjiang / WebSocket4Net

A popular .NET WebSocket Client
752 stars 272 forks source link

Can't connect with wss #178

Closed Hanshan8023 closed 3 years ago

Hanshan8023 commented 3 years ago

Hi :

I use this code to connect a wss address. But doesn't work! ws_data = new WebSocket4Net.WebSocket("wss://premws-pt3.365pushodds.com/zap/?uid=1797149192385"); executed code, I got an exception:

WebSocket_Error System.Security.Authentication.AuthenticationException: .......

kerryjiang commented 3 years ago

What's the message of this exception?

Hanshan8023 commented 3 years ago

WebSocket_Error System.Security.Authentication.AuthenticationException: 调用 SSPI 失败,请参见内部异常。 ---> System.ComponentModel.Win32Exception: 要求的函数不受支持 --- 内部异常堆栈跟踪的结尾 --- 在 System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) 在 System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) 在 System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) 在 SuperSocket.ClientEngine.SslStreamTcpSession.OnAuthenticated(IAsyncResult result) 在 System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult) 在 System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result) 在 System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult) 在 SuperSocket.ClientEngine.SslStreamTcpSession.OnAuthenticated(IAsyncResult result) WebSocket_Closed