Is that possible to send HttpWebRequest using TLS1.2 on .NET 4.0 framework
Solution 1:
Yes, it supports it but you must explicitly set the TLS version on the ServicePointManager
. Just have this code run anytime (in same app domain) before you make the call to Experian:
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12
Update
see @iignatov 's answer for what you must do for framework v4.0. My code works with 4.5+
Solution 2:
I had to deal with the same problem, while integrating PayPal into a legacy application, and found the following workaround for .NET 4.0 which seems to do the trick:
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
ServicePointManager.DefaultConnectionLimit = 9999;
Basically the workaround is to directly assign the port for TLS 1.2.
All credit goes to the commenter at CodeProject.