I have a Windows 2008 R2 server running SQL Server 2008 and a .NET Framework 4.0 Web application (CMS). Unfortunately, I cannot upgrade .Net because of the app, but I need to disable TLS 1.0 and lower. when I do that, I lose the ability to access the application unless I re-enable 1.0. Is there any way to use TLS 1.2 with .Net framework 4.0?
What do you mean by disabling TLS 1.0 and lower?
What you can do is to enable/set as default TLS 1.2 in your Global.asax file and it should do the job.
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
Just make sure that System.Net
is imported
If Enum value is missing you can try to do next
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;//SecurityProtocolType.Tls1.2;
Bad news here is that you might need to replace System.dll with 4.5 version according to this post
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.