请求被中止: 未能创建 SSL/TLS 安全通道
2024-08-25 09:36:52
出现“请求被中止: 未能创建 SSL/TLS 安全通道。”的问题。
在创建请求地址的前面加了这句代码就可以了
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
代码示例:
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(serverURL);
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
strNewValue = "cmd=_notify-synch&tx=" + System.Web.HttpContext.Current.Request.QueryString["tx"] + "&at=" + PayPalParameter.BusinessToken;
最新文章
- 【noip 2005】 采药
- 解决Python2.7的UnicodeEncodeError: 'ascii' codec can’t encode异常错误
- Contains Duplicate III
- javascript学习第二课
- Nonove js timer 计时器
- Unity加入Android广告小结
- 关于sublime text的配置方法
- PHP读书笔记(6)- 数组
- JS保留两位小数 四舍五入函数
- OpenGL—Android 开机动画源码分析二
- java实现文件转换成二进制存储与取出
- 【转】怎么解决java.lang.NoClassDefFoundError错误 ,以及类的加载机制
- cmake编译opencv指南
- ueditor后台配置项返回格式出错,上传功能将不能正常使用
- python数据结构之队列(一)
- 小鬼难缠--python小bug备忘
- php 日期和时间
- Red and Black HDU - 1312
- itcast-spring-三大框架整合
- 简单的SpringMVC经典案例