If you are using WebClient in C# and getting following error,
"The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel."
and you want to bypass the SSL certificate security, just use this code to bypass the security check, before calling client.OpenRead method
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(
delegate
{
return true;
});
No comments:
Post a Comment