在调用外部接口时,遇到的一个问题。本地可以调用成功。但是程序放在公有云上调用几次后就会返回上述的错误。接口是基于https的。
在社区找到解决办法,先记录一下。
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
//.net 4.0
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
在调用外部接口时,遇到的一个问题。本地可以调用成功。但是程序放在公有云上调用几次后就会返回上述的错误。接口是基于https的。
在社区找到解决办法,先记录一下。
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
//.net 4.0
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
1114

被折叠的 条评论
为什么被折叠?