C# SecurityProtocol协商未能使用服务的所有值
我与.NET服务引用连接有问题。我们正在从.NETV4.5迁移到V4.6.2。默认的SecurityProtocol发生了更改 V4.5默认使用SSL3和TLS1.0,但V4.6+默认使用TLS1.0、TLS1.1和TLS1.2 连接到most服务时,SSL3被禁用。这种行为似乎是它首先尝试的最高安全协议。如果失败,那么客户机通常会沿着链向下移动到下一个级别 对于web服务中的这个特定服务器,似乎如果第一个协议不是正确的协议,那么它不会在指定协议列表中下移 我已经确定该服务只支持TLS1.0。没有其他协议将连接 Works(V4.5的默认设置): 也适用(在代码中设置自定义): 失败:C# SecurityProtocol协商未能使用服务的所有值,c#,.net,wcf-security,tls1.2,tls1.0,C#,.net,Wcf Security,Tls1.2,Tls1.0,我与.NET服务引用连接有问题。我们正在从.NETV4.5迁移到V4.6.2。默认的SecurityProtocol发生了更改 V4.5默认使用SSL3和TLS1.0,但V4.6+默认使用TLS1.0、TLS1.1和TLS1.2 连接到most服务时,SSL3被禁用。这种行为似乎是它首先尝试的最高安全协议。如果失败,那么客户机通常会沿着链向下移动到下一个级别 对于web服务中的这个特定服务器,似乎如果第一个协议不是正确的协议,那么它不会在指定协议列表中下移 我已经确定该服务只支持TLS1.0。没
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
失败:
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
失败:
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
失败:
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
不幸的是,安全协议似乎是在应用程序域级别指定的。我有其他需要TLS 1.2的服务。此特定服务仅在TLS 1.0上运行
是否有人有一个解决方案可以:
A) 允许该服务仅使用TLS 1.0,同时将其他SecurityProtocol值保留为V4.6.2的默认值,TLS 1.0、1.1和1.2可用
或
B) 建议维护服务的管理员如何重新配置服务服务器以正确协商?web服务也是一个WCF.NET应用程序,但应用程序代码和服务器不在我的控制之下
谢谢
更新:
我已确认服务器和在服务器上具有此WCF的IIS将通过TLS 1.2加载网页
用于测试的另一台服务器/IIS上的web服务副本没有此问题(尽管测试应用与实时应用可能存在一些差异,因为我无法控制它们或不知道它们的代码)
我们正在使用以下绑定连接到WCF
<basicHttpBinding>
<binding name="ClientCertAuthBindingEndPoint" closeTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
<security mode="Transport">
<transport clientCredentialType="Certificate" />
</security>
</binding>
<binding name="ClientCertAuthBindingEndPoint1" closeTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
<security mode="Transport">
<transport clientCredentialType="Certificate" />
</security>
</binding>
<binding name="CmreServiceSoap">
<security mode="Transport" />
</binding>
</basicHttpBinding>
B)他们这边可能是2008R2。。TLS可能需要像这里描述的那样启用:我同意启用TLS 1.2可能会解决这个问题,但是TLS 1.0已经启用,并且是我的客户端应该尝试的协议的一部分。我看到过这样的评论:服务器可以设置不同的安全协商,这样就不会进行协商。尽管服务器上启用了.tls1.2,但我还没有找到任何关于这方面的清晰文档。它在WCF上似乎不起作用。