【发布时间】:2014-09-30 20:11:07
【问题描述】:
我们的 WCF 客户端通常调用 Web 服务。客户端的所有部署都调用相同的 Web 服务。在大多数部署中,它可以毫无问题地进行调用,但在一种情况下,它会报告以下异常:
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
at System.Net.PooledStream.EndWrite(IAsyncResult asyncResult)
at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
这一次安装有什么不同?
我们测试了客户端用于在浏览器中调用 Web 服务的 URL。 Web 服务在 Firefox 中返回 ok 响应,但在 IE 中没有。
【问题讨论】:
-
可能是一个损坏的证书存储,或类似的东西。
-
托管 wcf 客户端的 Windows 计算机上的证书存储损坏?纠正它的最佳行动方案是什么?
-
第一步是删除证书,然后重新安装证书。 IE 显示什么错误?
-
部署是什么?机器是一样的吗?他们在哪?你能检查一下代理设置吗?你能确保机器上的时间同步吗?