简体   繁体   English

.NET禁用不是TLS1.2的入站

[英].NET Disable inbound that are not TLS1.2

I developed an WCF that can only be consumed with SecurityProtocol = SecurityProtocolType.Tls12 for clients PCI requirement. 我开发了一种WCF,该WCF只能与SecurityProtocol = SecurityProtocolType.Tls12配合使用,以满足客户端的PCI需求。

My question is, how can i check the security protocol used by the inbound (code in each method)? 我的问题是,如何检查入站使用的安全协议(每种方法中的代码)? How to reject inbound without TLS1.2? 没有TLS1.2的情况下如何拒绝入站?

Regards. 问候。

Edit: i know how to force the inbound to be TLS12. 编辑:我知道如何强制入站是TLS12。 And i know how to configure server to only allow TLS12. 而且我知道如何将服务器配置为仅允许TLS12。 But in testing server i can not do that, so i need to check this on the WCF configuration insted on server conf. 但是在测试服务器中我无法做到这一点,因此我需要在服务器conf上插入的WCF配置上进行检查。

要限制协议,请尝试设置全局ServicePointManager

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM