随机 "could not establish secure channel for SSL/TLS" 错误

Random "could not establish secure channel for SSL/TLS" errors

我有一个托管在 IIS 中的 WCF 应用程序,它作为其他两个不同的 SOAP Web 服务 A 和 B 的中间体。

从我的应用程序调用服务操作总是可以的。 从我的应用程序调用 B 服务操作有问题:

我注意到在 IIS 中回收池可以解决问题,直到下一次。

我的应用程序托管在两台服务器上,并通过负载均衡器提供服务。当我在服务器 1 中遇到上述问题时,第二台服务器并不总是如此。

什么会导致随机错误?有什么想法吗?

将 SecurityProtocolType 更改为 ssl3 或 Tls1 为我解决问题。

System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls1;

在您的服务器上打开事件查看器,在 IIS 中回收池并检查 schannel 错误...

我认为这就是导致问题的原因...

https://social.technet.microsoft.com/Forums/windows/en-US/0d66e764-d7d2-4a98-8a0f-27241e31ef7c/schannel-36888-the-following-fatal-alert-was-generated-10-the-internal-error-state-is-10?forum=w7itprosecurity