Our client have recently upgrade the security protocol to TLS 1.2. Therefore We have our application upgraded to 4.6.1 expecting the security protocol will be default to TLS
I tried the following code in my api which is not working for Kaltura account integration(bec'z Kaltura API upgraded to TLS 1.2) and it start working. .Net framework is 4.5.2 and server :windows server 2008 r2 where application hosted.
#region To handle TLS (Transport Layer Security) Version and support
var assembly = Assembly.GetExecutingAssembly();
var attributes = assembly.GetCustomAttributes(typeof(TargetFrameworkAttribute), false);
var version = (TargetFrameworkAttribute)attributes[0];
SecurityProtocolType flag;
if (Enum.TryParse("Tls11", out flag))
ServicePointManager.SecurityProtocol |= flag;
if (Enum.TryParse("Tls12", out flag))
ServicePointManager.SecurityProtocol |= flag;
#endregion
Thanks.