无法创建SSL / TLS安全通道

时间:2012-06-29 17:05:49

标签: javascript facebook httpwebrequest facebook-javascript-sdk

我只是有时得到此错误 - 似乎有时只会发生这种情况。如果我刷新页面,它似乎自我修复。有什么想法吗?

The request was aborted: Could not create SSL/TLS secure channel. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.

从这段代码:

    string ThirdURL = "https://api.facebook.com/method/users.getInfo?uids=" + FacebookUserID + "&client_id=" + AppCode.Facebook.APPLICATION_ID + "&access_token=" + AccessToken + "&fields=first_name,last_name,current_location,email,birthday,sex,pic_square,locale&format=json";
    HttpWebRequest APIThirdRequest = (HttpWebRequest)WebRequest.Create(ThirdURL);
    StreamReader APIThirdResponse = new StreamReader(APIThirdRequest.GetResponse().GetResponseStream());

//error on line below -->
        string MoreAPIData = APIThirdResponse.ReadToEnd();

1 个答案:

答案 0 :(得分:1)

这是Facebook方面的一个临时问题。虽然它持续一个解决方案是使用x量的请求的最大重试进行“try-catch循环”,即使它可能被认为是不好的做法。

问题本身自2012-07-17以来已经解决。

Facebook开发者关于此问题的门票: