.Net Framework 4.6.1 not defaulting to TLS 1.2

后端 未结 11 2175
暖寄归人
暖寄归人 2020-11-30 23:45

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

11条回答
  •  猫巷女王i
    2020-12-01 00:02

    I had a similar problem and this is what worked for me.

    1. open Powershell and check for supported protocols by using [Net.ServicePointManager]::SecurityProtocol

    2. Run the following 2 cmdlets to set .NET Framework strong cryptography registry keys:

      set strong cryptography on 64 bit .Net Framework (version 4 and above)

      Set-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord

      set strong cryptography on 32 bit .Net Framework (version 4 and above)

      Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord

    3. Restart Powershell and check again for supported protocol by using [Net.ServicePointManager]::SecurityProtocol

    It should now display Tls12 as well.

    Hope this helps

提交回复
热议问题