Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Open Connection to wss://echo.wss-websocket.net, getting error "Authentication failed because the remote party has closed the transport stream." #171

Open
ronaldowww opened this issue Apr 27, 2020 · 0 comments

Comments

@ronaldowww
Copy link

ronaldowww commented Apr 27, 2020

Hi,
I am using WebSocket4Net 0.15.2.11, and trying to open a connection to wss://echo.wss-websocket.net. But I got the error "Authentication failed because the remote party has closed the transport stream.".

I have already enable the SSL:

WebSocket socket = new WebSocket("wss://echo.wss-websocket.net", string.Empty, version: WebSocketVersion.Rfc6455, customHeaderItems: null);
socket.Security.EnabledSslProtocols = System.Security.Authentication.SslProtocols.Tls
| System.Security.Authentication.SslProtocols.Tls11
| System.Security.Authentication.SslProtocols.Tls12;
socket.Open();
while (socket.State == WebSocketState.Connecting)
Thread.Sleep(500);

at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
at SuperSocket.ClientEngine.SslStreamTcpSession.OnAuthenticated(IAsyncResult result)

But chrome extension can work, such as Browser WebSocket Client(chrome-extension://mdmlhchldhfnfnkfmljgeinlffmdgkjo/index.html).
So could you please suggest how to make it work? Thanks a lot.

BR,
wen-wen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant