如何让.net程序支持TLS1.2

1.将.Net FrameWork设置成4.6以上版本

2.在需要的类中引入命名空间

using System.Net;

3.在程序调用接口(如支付)的地方,加一段代码即可

System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

猜你喜欢

转载自www.cnblogs.com/yixuanhan/p/9197675.html