Adding TLS 1.2 support in .Net applications

430 views Asked by At

We have 2 tracks

Adding TLS 1.2 support to .Net 4.6.1 application

As of now we have added below line of code wherever we're making REST API calls

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;

But as per this article we just need to implement AppContextSwitchOverrides concept in web.config. With this change

  1. Can I remove ServicePointManager.SecurityProtocol code line from everywhere in application since with AppContextSwitchOverrides change .Net application will pick up OS level TLS supported version
  2. With AppContextSwitchOverrides change Do I need to verify with Infra team whether they have added TLS1.2 OS level support( Window 2012 R2 ). If not , I'll not remove ServicePointManager.SecurityProtocol line of code
  3. Instead of doing all above change Can I simply change targetFramework from 4.6.1 to 4.6.2 in application which is by default supporting TLS 1.2. Do you think any complication on this .Net version change?

Adding TLS 1.2 support to .Net 4.5.1 application

Do we need to follow the steps as mentioned in this article OR Use AppContextSwitchOverrides concept for this version

0

There are 0 answers