I have a web service that is consuming开发者_运维问答 a third party webservice over https over a dedicated connection, I applied the ServicePointManager.ServerCertificateValidationCallback mechanism to overpass the ssl, the service is working, but the problem is that everytime I invoke the third party webservice there is a connection trying to get to crl.verisign.net, the problem is that our production servers don't have internet connection, and because of this is delaying 9 secs per call.
Is there any way to get rid of this connection to crl.verisign.net? any help would be appreciate it.
Thanks
ServerCertificateValidationCallback code:
ServicePointManager.ServerCertificateValidationCallback = New RemoteCertificateValidationCallback(AddressOf SubCertHandler)
ServicePointManager.CheckCertificateRevocationList = False
Private Shared Function SubCertHandler(ByVal sender As Object, ByVal certificate As X509Certificate, ByVal chain As X509Chain, ByVal sslPolicyErrors As SslPolicyErrors) As Boolean
Return True
End Function
This is a common problem. The solution is sometimes environment specific.
If you are already using ServicePointManager, try setting the CheckCertificationRevocationList property to false.
http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.checkcertificaterevocationlist.aspx
Found the problem. In the server there's a service called "Win http Web Proxy Auto Discovery", when we disabled this service everything worked as expected.
Thanks for your help!!!
精彩评论