【发布时间】:2010-08-07 00:06:52
【问题描述】:
我一直在努力解决这个问题很长时间,但现在无济于事。 希望一些 SOers 可以提供帮助。
为 Gmail 联系人 API 使用 oAuth.net 库
请求似乎格式正确,我已逐步检查请求,没有发现任何错误。
-
尝试检查时间戳是否存在问题 - 这似乎是 gmail 论坛上的常见问题,尝试更改为不同的时区,仍然没有运气。
公共字符串 WebResponseGet(HttpWebRequest webRequest) { StreamReader responseReader = null; 字符串响应数据 = "";
try { //This is where the exception is thrown responseReader = new StreamReader(webRequest.GetResponse().GetResponseStream()); responseData = responseReader.ReadToEnd(); } catch (WebException ex) { Console.WriteLine(ex); throw; } finally { webRequest.GetResponse().GetResponseStream().Close(); responseReader.Close(); responseReader = null; } return responseData;}
【问题讨论】:
-
@Mikos 错误必须在您的 WebQuest.Create 上(可能..)因为我在这里看不到任何重大问题。
标签: asp.net oauth google-api google-contacts-api