One Day Sec

How do you handle untrusted SSL certificates when using the EWS Managed API in C#?

To bypass certificate validation errors, you can add a certificate trust policy using `ServicePointManager.ServerCertificateValidationCallback` that returns `true` for all certificates. This is necessary because Exchange Server self-signed certificates often cause an untrusted error, leading to a closed SSL connection. The C# code snippet in the guide shows: `ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => { return true; };`.
SSL/TLScertificate trustServicePointManagerEWS Managed APIuntrusted certificate

Browse all Q&A →