title: The request was aborted: Could not create SSL/TLS secure channel
body: <p>We are unable to connect to an HTTPS server using <code>WebRequest</code> because of this error message:</p>
  <p><code>The request was aborted: Could not create SSL/TLS secure channel.</code></p>
  <p>We know that the server doesn't have a valid HTTPS certificate with the path used, but to bypass this issue, we use the following code that we've taken from another StackOverflow post:</p>
  <pre><code>private void Somewhere() {
      ServicePointManager.ServerCertificateValidationCallback += new RemoteCertificateValidationCallback(AlwaysGoodCertificate);
  }
  
  private static bool AlwaysGoodCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors policyErrors) {
     return true;
  }
  </code></pre>
  <p>The problem is that server never validates the certificate and fails with the above error. Does anyone have any idea of what I should do?</p>
  <hr />
  <p>I should mention that a colleague and I performed tests a few weeks ago and it was working fine with something similar to what I wrote above. The only &quot;major difference&quot; we've found is that I'm using Windows 7 and he was using Windows XP.  Does that change something?</p>