question

ankitdhiman-6382 avatar image
0 Votes"
ankitdhiman-6382 asked DanielZhang-MSFT commented

SignalR - Winform Client not able to connect to server

Hi I have a web api hosting the SignalR server and trying to connect to it from Window application. but I am getting below error.

Message : The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
Inner Exception : The remote certificate is invalid according to the validation procedure.

My Api has a SSL certificate configured, How can I connect to that SignalR server from my Window App ?

windows-forms
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @ankitdhiman-6382,
The error message indicates that it is caused by the certificate, so you can follow the SᴇM's solution in first.
And it is also caused by self-signed and not signed by a trusted certificate authority.
You can try to add a certificate validation handler(Returning true will allow ignoring the validation error).

 ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;

If not successful, please provide more details and some related code.
Best Regards,
Daniel Zhang



0 Votes 0 ·

Hi @ankitdhiman-6382,
Do you still meet this issue? If so, could you please share more detailed information and the relevant code code. I am looking forward to seeing your message.
Best Regards,
Daniel Zhang

0 Votes 0 ·

0 Answers