两种方法:
1.在代码中修改
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;// SecurityProtocolType.Tls1.2;
2.修复注册表
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319]
"SchUseStrongCrypto"=dword:00000001
https://*.com/questions/33761919/tls-1-2-in-net-framework-4-0
https://blogs.msdn.microsoft.com/jchiou/2016/05/27/如何在-net-framework-4-0-4-5-以上的程式支援-tls-1-2/