title: ValidateServerCertificate - ServerCertificateValidationCallback
body: <p>I am using the below code for certificate validation.</p>
  
  <pre><code>System.Net.ServicePointManager.ServerCertificateValidationCallback = New System.Net.Security.RemoteCertificateValidationCallback(AddressOf ValidateServerCertificate)
  
  Public Shared Function ValidateServerCertificate(ByVal sender As Object, ByVal certificate As X509Certificate, ByVal chain As X509Chain, ByVal sslPolicyErrors As Net.Security.SslPolicyErrors) As Boolean
      If sslPolicyErrors = Net.Security.SslPolicyErrors.None Then
          Return True
      End If
      Return False
  End Function
  </code></pre>
  
  <p>I am getting RemoteCertificateChainErrors. How to resolve it.</p>