Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (25 sloc) 857 Bytes
published title date author layout permalink tags
true
Enable Tls 1.1 or Tls 1.2 on WCF 4.0
2018-12-04 10:58:11 UTC
fabiocozzolino
post
/enable-tls1.1-or-tls1.2-wcf-4.0/
WCF
Tls
Security

Windows Communication Foundation 4.0 support Ssl3/Tls1.0 out-of-the-box. If you need to support Tls1.1 or Tls1.2, you must update to .NET Framework 4.6. If you can't do that, try the following workaround just before establish the secure connection:

Set the SecurityProtocol to 768 if you want to use Tls1.1

System.Net.ServicePointManager.SecurityProtocol = (System.Net.SecurityProtocolType)768;

or set to 3072 if you want to use Tls1.2

System.Net.ServicePointManager.SecurityProtocol = (System.Net.SecurityProtocolType)3072;

Note

Be sure to have .NET Framework 4.5 or above installed on the client machine!

Enjoy!

You can’t perform that action at this time.