adsense

Wednesday, December 6, 2017

.NET Support for TLS 1.2

It seems that support for TLS 1.2 dependent on the .net framework version.

  • NET 4.6 and above. Supported by default.
  • .NET 4.5. TLS 1.2 is supported. The following code will make TLS 1.2 to be used as the default protocol.                                                                  ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
  • .NET 4.0. TLS 1.2 is not supported, but following code can be used as a workaround:
    ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
  • .NET 3.5 or below. TLS 1.2 is not supported.
Cheers,

Samitha