100% Australian Windows Web Hosting
  • Knowledge Base

TLS 1.1 and 1.2 support on ASP.NET 3.5 and older 

Was this helpful? (3) (0)

When using code in ASP.NET to connect to a remote https server such as PayPal, .NET versions older than 4.6 will not automatically
use the newer TLS protocols.

To enable support, the following code needs to be added to the web site, preferably somewhere in the startup code (such as in global.asax):


System.Net.ServicePointManager.SecurityProtocol = 3840


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

This code will enable only TLS 1.1 and 1.2 for all outbound connections. TLS 1.0 and older SSL versions will be disabled.


Last Updated:  27/06/2018 2:38 PM