大润晟泽博客

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 516|回复: 0

c#"请求被中止: 未能创建 SSL/TLS 安全通道"解决方法

[复制链接]

16万

主题

16万

帖子

49万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
493076
发表于 2021-12-30 15:40:05 | 显示全部楼层 |阅读模式
在.NET 4.5中,对此的解决方案是

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
如果您没有.NET 4.5,那么请使用

ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;


要执行请求前加上

ServicePointManager.SecurityProtocol = (SecurityProtocolType)192 | (SecurityProtocolType)768 | (SecurityProtocolType)3072;






上一篇:logstash把mysql数据导入elasticsearch
下一篇:linux服务器重启后导致redis数据丢失
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|大润晟泽博客 ( 鲁ICP备17022854号-3 )

GMT+8, 2024-4-25 10:30 , Processed in 0.197363 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表