I have the following code that throws a WebException, and I cannot understand why life is for me. VS2012 / .Net 4.5 RTM for Windows 8 RTM.
ServicePointManager.CertificatePolicy = null; ServicePointManager.CheckCertificateRevocationList = false; ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; var request = WebRequest.Create(url) as HttpWebRequest; request.ServerCertificateValidationCallback = delegate { return true; }; var response = request.GetResponse(); WebException was unhandled The request was aborted: Could not create SSL/TLS secure channel.
I initially had a callback as its own method, which was never called. Any ideas why I cannot ignore SSL validation errors and send all my sensitive data to an unknown web server?
source share