相关疑难解决方法(0)

请求已中止:无法创建SSL/TLS安全通道

我的客户通过他们的SSL和Internet Explorer了解了我的问题.他们说他们在访问URL时会遇到信任问题.

我通过HTTPS访问JSON.该网站位于一台服务器上,我在本地计算机上使用控制台应用程序.我试图绕过SSL证书,但是,我的代码仍然失败.

我可以改变HttpWebRequest来解决这个问题吗?

我使用此代码得到此错误:

    // You must change the URL to point to your Web server.
        HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
        req.Method = "GET";
        req.AllowAutoRedirect = true;

        // allows for validation of SSL conversations
        ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };


        WebResponse respon = req.GetResponse();
        Stream res = respon.GetResponseStream();

        string ret = "";
        byte[] buffer = new byte[1048];
        int read = 0;
        while ((read = res.Read(buffer, 0, buffer.Length)) > 0)
        {
            //Console.Write(Encoding.ASCII.GetString(buffer, 0, read));
            ret += Encoding.ASCII.GetString(buffer, 0, read);
        } …
Run Code Online (Sandbox Code Playgroud)

c# asp.net ssl httpwebrequest

56
推荐指数
5
解决办法
12万
查看次数

Paypal Sandbox MVC3

我正在为我正在制作的网站测试paypal API.昨晚一切正常,但今天再次运行时,我收到以下错误:

无法使用权​​限'api-aa.sandbox.paypal.com'为SSL/TLS建立安全通道

paypal-sandbox asp.net-mvc-3

7
推荐指数
1
解决办法
2195
查看次数