.net asp.net Web 应用程序尝试连接到 crl.verisign.net

发布于 2024-11-03 04:46:06 字数 741 浏览 0 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

橘虞初梦 2024-11-10 04:46:06

这是一个常见问题。解决方案有时是特定于环境的。

如果您已在使用 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

居里长安 2024-11-10 04:46:06

发现问题了。在服务器中有一个名为“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!!!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文