Wednesday, 29 July 2020

How to solve “Could not establish trust relationship for the SSL/TLS secure channel with authority”

A one line solution. Add this anywhere before calling the server on the client side:

System.Net.ServicePointManager.ServerCertificateValidationCallback +
= delegate { return true; };

This should only be used for testing purposes because the client will skip SSL/TLS security checks.

No comments:

Post a Comment