How to bypass SSL validation for Exchange Webservices Managed API

by Sevki — 3 Feb 2009
[pdf and ps]

anyways here is what you need to do in your code declare these

using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
public static bool OnValidationCallback(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors errors)
 return true;

put this before your code executes

ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(OnValidationCallback);

and you are good to go..