.net asp.net Web 应用程序尝试连接到 crl.verisign.net
我有一个 Web 服务,它通过专用连接通过 https 使用第三方 Web 服务,我应用了 ServicePointManager.ServerCertificateValidationCallback 机制来越过 ssl,该服务正在工作,但问题是每次我调用第三方 Web 服务时都会出现尝试访问 crl.verisign.net 的连接,问题是我们的生产服务器没有互联网连接,因此每次调用都会延迟 9 秒。
有什么方法可以摆脱与 crl.verisign.net 的连接吗?任何帮助将不胜感激。
感谢
ServerCertificateValidationCallback 代码:
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
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是一个常见问题。解决方案有时是特定于环境的。
如果您已在使用 ServicePointManager,请尝试将 CheckCertificationReplicationList 属性设置为 false。
http://msdn.microsoft.com/en-us /library/system.net.servicepointmanager.checkcertificatereplicationlist.aspx
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
发现问题了。在服务器中有一个名为“Win http Web Proxy Auto Discovery”的服务,当我们禁用该服务时,一切都按预期工作。
感谢您的帮助!!!
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!!!