简体   繁体   English

在.NET 4.5.1上启用TLS 1.2

[英]Enable TLS 1.2 on .NET 4.5.1

A lot of articles seem to suggest adding the following registry keys to enable TLS 1.2 on .NET framework 4.5.1 许多文章似乎建议添加以下注册表项以在.NET Framework 4.5.1上启用TLS 1.2

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NetFramework\v4.0.30319
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NetFramework\v4.0.30319

SchUseStrongCrypto = 1

But this isn't the case when we test, it still uses TLS 1.0. 但是当我们进行测试时并非如此,它仍然使用TLS 1.0。 We've also tried installing IISCrypto and enabled all the protocols (TLS 1.0,1.1,1.2), but this fails also (restarting the server included). 我们还尝试安装IISCrypto并启用了所有协议(TLS 1.0、1.1、1.2),但这也失败了(重新启动包含的服务器)。 IISCrypto creates all the correct keys here, but no luck: IISCrypto在这里创建所有正确的密钥,但是没有运气:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\

What DOES work, is simply installing .NET Framework 4.6.1 instead. 什么工作,仅仅是安装的.NET Framework 4.6.1来代替。 But in this situation we can't upgrade. 但是在这种情况下,我们无法升级。 What actions do we need to take to enable TLS 1.2 for .NET 4.5.1? 为启用.NET 4.5.1的TLS 1.2,我们需要采取什么措施?

Did you make it the default protocol? 您是否将其设置为默认协议? Else it might be supported but not the default : 否则可能会支持,但不是默认值:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

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

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