Loading

C# SSL认证设置

//.net 4.0 设置: 
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;

//.net 4.5 设置: 
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls1.2;

  

附上官方说明

https://docs.microsoft.com/zh-cn/dotnet/api/system.net.securityprotocoltype?view=netframework-4.7.2

posted @ 2021-12-21 14:25  jevan  阅读(622)  评论(0编辑  收藏  举报