Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to fetch and pass the imported SSL certificate as trusted while connecting to the web socket in c#. Currently I am using websocketclient but getting the SSL Certificate Exception even after importing. I need to fetch it and connect to server related to handshaking.
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.


What I have tried:

Currently Connecting as
connect("wss://10.34.1.1/Test.aspx/) ;
webSocket.ConnectAsync(new Uri(uri), CancellationToken.None);
Posted
Updated 25-Jul-18 21:47pm
v2
Comments
[no name] 26-Jul-18 4:08am    
Why do you think "fetching and importing and passing" is somehow related to an invalid "SERVER" certificate?

You can choose to accept the certificate in your authorization callback, or not.

You can buy insurance, or not.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900