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