如何让.net程序支持TLS1.2时间:2023-03-10 01:37:26 1.将.Net FrameWork设置成4.6以上版本 2.在需要的类中引入命名空间 using System.Net; 3.在程序调用接口(如支付)的地方,加一段代码即可 System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;