c# - Schannel 协议注册表设置覆盖 ServicePointManager.SecurityProtocol 值?
问题描述
我正在创建一个 WCF 应用程序,在其中我将 ServicePointManager.SecurityProtocol 设置为接受 TLS1.2。我还将创建此处概述的 SChannel 服务注册表项,以禁用除 TLS1.2 之外的所有客户端/服务器协议(将设置为 Enabled = 0)。
我了解 SChannel 设置会创建操作系统级别设置。我想知道是否在我的代码中明确设置
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
它会覆盖操作系统设置并允许 TLS1.1 连接?
由于这里的陈述,我感到困惑 - 如果您想使用注册表配置安全性,请不要在代码中指定安全协议值;这样做会覆盖注册表设置。
此更新不会更改手动设置安全协议而不是传递默认标志的应用程序的行为。
编辑 1:我正在使用 .Net v4.7。
解决方案
推荐阅读
- node.js - Couchbase Sync 网关 - 文件上传为附件
- ios - 如何在每 N 个单词之后将子字符串作为分隔符添加到段落
- django - Django SQLite 外键不匹配错误
- vb.net - 使用 VB.Net 使用 SQL Server 2000 修改连接字符串 Visual Studio 2015
- php - 如何使用PHP根据类别计算分数
- email - 使用谷歌应用脚本获取 gmail 中的当前线程 ID
- ios - ionic 3 cordova ios build failed 'google/protobuf/Api.pbobjc.h' 文件未找到
- email - Jenkins - 如何在 FxCop 报告中发送包含警告和问题的电子邮件
- python - 遍历 pandas 系列
- r - 对相似列求和