.net4.0 如何设置tls1.2

king_Ls 2017-06-28 07:28:54
我用vs2010 .net最要版本4.0
在使用httprequest请求https站点时遇到了“基础连接已关闭 发送时发生错误”的异常
处理过程中发现目标站点使用的是tls1.2协议 而 4.0只能设置ssl3和tls
尝试枚举类型转换ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
抛出异常不支持的协议
这个问题需要如何来出来呢?
...全文
1661 9 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
加油馒头 2018-04-04
  • 打赏
  • 举报
回复
引用 3 楼 GT7466 的回复:
1.设置站点支持tls,如果是win系统,可以在控制面板>internet选项>高级 中勾选对应项。 2.覆盖安装.net4.5,主要是替换System.dll
ServicePointManager.SecurityProtocol = (SecurityProtocolType)192 |(SecurityProtocolType)768 | (SecurityProtocolType)3072;
写的很清楚哦 要么对方支持TLS1.0 要么你升级到4.5,支持TLS1.2
努力的阿牛 2018-01-16
  • 打赏
  • 举报
回复
看来只能用4.5了,微软在各方面技术都在有意淘汰XP
csdn_xuler 2017-12-24
  • 打赏
  • 举报
回复
问题解决了吗?同问。
king_Ls 2017-07-07
  • 打赏
  • 举报
回复
引用 4 楼 GT7466 的回复:
[quote=引用 3 楼 GT7466 的回复:] 1.设置站点支持tls,如果是win系统,可以在控制面板>internet选项>高级 中勾选对应项。 2.覆盖安装.net4.5,主要是替换System.dll
ServicePointManager.SecurityProtocol = (SecurityProtocolType)192 |(SecurityProtocolType)768 | (SecurityProtocolType)3072;
这是2种办法,不是2个步骤。[/quote] 我知道这种解决方案 但是我想要的是能够在xp中同样能够使用 然而.net4.5不支持xp这也就是我遇到问题的症结所在还望有解决方案 我在
cdcjk 2017-06-29
  • 打赏
  • 举报
回复
覆盖安装.net4.5,主要是替换System.dll
GT7466 2017-06-29
  • 打赏
  • 举报
回复
引用 3 楼 GT7466 的回复:
1.设置站点支持tls,如果是win系统,可以在控制面板>internet选项>高级 中勾选对应项。 2.覆盖安装.net4.5,主要是替换System.dll
ServicePointManager.SecurityProtocol = (SecurityProtocolType)192 |(SecurityProtocolType)768 | (SecurityProtocolType)3072;
这是2种办法,不是2个步骤。
GT7466 2017-06-29
  • 打赏
  • 举报
回复
1.设置站点支持tls,如果是win系统,可以在控制面板>internet选项>高级 中勾选对应项。 2.覆盖安装.net4.5,主要是替换System.dll
ServicePointManager.SecurityProtocol = (SecurityProtocolType)192 |(SecurityProtocolType)768 | (SecurityProtocolType)3072;
king_Ls 2017-06-29
  • 打赏
  • 举报
回复
没有大神有解决方案吗?
king_Ls 2017-06-28
  • 打赏
  • 举报
回复
没有人,自己顶一下

111,098

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧