zoukankan      html  css  js  c++  java
  • 请求被中止: 未能创建 SSL/TLS 安全通道

    出现“请求被中止: 未能创建 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;
  • 相关阅读:
    lesson
    lesson
    课后习题-5
    lesson
    lesson
    lesson
    重启网络服务时 Bringing up interface eth0
    课后习题-4
    基础扩展
    课后习题-3
  • 原文地址:https://www.cnblogs.com/kekelele/p/8933442.html
Copyright © 2011-2022 走看看