作者热门文章
- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我只是有时 收到此错误 - 似乎它只是偶尔发生。如果我刷新页面,它似乎会自行修复。有什么想法吗?
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();
最佳答案
这是 Facebook 方面的临时问题。虽然它持续了一个解决方案是做一个“try-catch 循环”,其中请求的最大重试次数为 x,即使它可能被认为是不好的做法。
自 2012 年 7 月 17 日起,问题本身已得到解决。
关于该问题的 Facebook 开发者票证:
关于javascript - 无法创建 SSL/TLS 安全通道,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11266020/
一 点睛 通道用于数据的双向传输,即一个通道既可以用于读数据,又可以用于写数据。注意,这点不同于 I/O 中的 Stream,Stream 是单向的(只能是输入流或输出流)。 在 NIO 中,就是使用
一 点睛 通道用于数据的双向传输,即一个通道既可以用于读数据,又可以用于写数据。注意,这点不同于 I/O 中的 Stream,Stream 是单向的(只能是输入流或输出流)。 在 NIO 中,就是使用
我是一名优秀的程序员,十分优秀!