Skip to content

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

Description

@ronaldowww

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions