问题描述
我们的客户最近将安全协议升级到 TLS 1.2.因此,我们将应用程序升级到 4.6.1,期望安全协议默认为 TLS 1.2,但事实并非如此.知道为什么吗?
Our client have recently upgrade the security protocol to TLS 1.2. Therefore We have our application upgraded to 4.6.1 expecting the security protocol will be default to TLS 1.2 but it is not. Any idea why?
推荐答案
我遇到了类似的问题,这对我有用.
I had a similar problem and this is what worked for me.
打开 Powershell 并使用
[Net.ServicePointManager]::SecurityProtocol
运行以下 2 个 cmdlet 来设置 .NET Framework 强加密注册表项:
Run the following 2 cmdlets to set .NET Framework strong cryptography registry keys:
在 64 位 .Net Framework(版本 4 及更高版本)上设置强加密
Set-ItemProperty -Path 'HKLM:SOFTWAREWow6432NodeMicrosoft.NetFrameworkv4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
在 32 位 .Net Framework(版本 4 及更高版本)上设置强加密
Set-ItemProperty -Path 'HKLM:SOFTWAREMicrosoft.NetFrameworkv4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
重新启动 Powershell 并使用 [Net.ServicePointManager]::SecurityProtocol
Restart Powershell and check again for supported protocol by using [Net.ServicePointManager]::SecurityProtocol
它现在也应该显示 Tls12
.
希望能帮到你
这篇关于.Net Framework 4.6.1 不默认为 TLS 1.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!