Are TLS 1.1 and TLS 1.2 enabled by default for .NET 4.5 and .NET 4.5.1

In our Windows 2012 Server R2, we need to disable TLS 1.0.

However, we do have .NET 4.5 Wcf services. We found that if we disable TLS 1.0 so that WCF services will no longer be running, we will get the error "existing connection was forcibly closed by the remote host."

Is TLS 1.1 / 1.2 enabled by default in .NET 4.5 and .NET 4.5.1? If not, we assume that this is so, where in our WCF project do we force the project to use TLS 1.1 / 1.2?

+6
source share
1 answer

No. The default protocols allowed for different versions of the framework are:

  • .NET Framework 4.5 and 4.5.1: SSLv3 and TLSv1
  • .NET Framework 4.5.2: SSLv3, TLSv1, and TLSv1.1
  • .NET Framework 4.6 and later: TLSv1, TLSv1.1, and TLS1.2

Sources: [1] [2]

You can specify which protocols are supported by your application using the ServicePointManager class, in particular by setting the SecurityProtocol property, which in your case you would like to set the following:

 System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12; 
+22
source

All Articles