开发者社区> 问答> 正文

ISV开发调用API 请求被中止未能创建 SSL/TLS 安全通道

1、在ISV中配置回调函数,套件生成正常
  2、在接受suite_ticket时 获取套件访问Token(suite_access_token)时 , 报请求被中止: 未能创建 SSL/TLS 安全通道
3、本地测试获取时正常,发布到外网服务器上出现如上错误提示




public static string PostWithHttps(string url, string postdata, string strEncoding = "UTF-8")
        {
          
            Encoding enCoding = Encoding.GetEncoding(strEncoding);
            var request = (HttpWebRequest)WebRequest.Create(url);
            request.Method = "post";
            //request.Accept = "text/html, application/xhtml+xml, */*";
            request.ContentType = "application/json;charset=UTF-8";
            byte[] buffer = enCoding.GetBytes(postdata);
            request.ContentLength = buffer.Length;
            request.GetRequestStream().Write(buffer, 0, buffer.Length);
            var response = (HttpWebResponse)request.GetResponse();
            Stream responseStream = response.GetResponseStream();
            using (var reader = new StreamReader(responseStream, enCoding))
            {
                return reader.ReadToEnd();
            }
        }


展开
收起
一枝花 2016-05-12 13:36:20 5203 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
Spring Boot2.0实战Redis分布式缓存 立即下载
CUDA MATH API 立即下载
API PLAYBOOK 立即下载