Using ExchangeClient how can I ignore a self signed certificate when I try to connect? I’m always getting the following exception:
"remote certificate is invalid according to the validation procedure"
I found a post related (Self signed certificate error- Aspose Network IMAP) but I ain’t using IMAP.
Thanks for your query.
We will look into it and try to provide similar solution as there is for IMAP. I have logged it in our bug tracking system (Issue ID: 13473). I will update you as soon there is a progress or it gets fixed. Sorry for the inconvenience.
Has there been any success in getting this to work? I am also interested in a way around this problem.
Please advise. Thanks.
Could you please try the following work around to ignore the certificate errors?
Add the following line in the init() or main() method of the program:
ServicePointManager.ServerCertificateValidationCallback += RemoteCertificateValidationHandler;
And add the below callback method:
private static bool RemoteCertificateValidationHandler(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
return true; //ignore the checks and go ahead