码迷,mamicode.com
首页 > 微信 > 详细

微信请求数据错误The request was aborted: Could not create SSL/TLS secure channel.

时间:2015-10-30 12:18:20      阅读:474      评论:0      收藏:0      [点我收藏+]

标签:

今天在后台向微信服务器请求JSON数据时,返回了错误:The request was aborted: Could not create SSL/TLS secure channel.

查了一下,原来去年SSL协议曝出高危漏洞后,微信公众平台关闭了SSLv2、SSLv3版本支持,请求数据时应该使用TLS或更高版本。

//在请求之前修改安全协议为TLS
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;

 

至于SSL和TLS的区别,参考这篇文章:http://hengstart.iteye.com/blog/840561

微信请求数据错误The request was aborted: Could not create SSL/TLS secure channel.

标签:

原文地址:http://www.cnblogs.com/sxxsw/p/4922858.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!