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

今天在后台向微信服务器请求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

posted @ 2015-10-30 11:42  sxxsw  阅读(4205)  评论(0编辑  收藏  举报
To me, you will be unique in all the world. To you, I shall be unique in all the world.