【问题标题】:oAuth/Gmail from ASP.NET - "The remote server returned an error: (400) Bad Request"来自 ASP.NET 的 oAuth/Gmail -“远程服务器返回错误:(400) 错误请求”
【发布时间】:2010-08-07 00:06:52
【问题描述】:

我一直在努力解决这个问题很长时间,但现在无济于事。 希望一些 SOers 可以提供帮助。

  1. 为 Gmail 联系人 API 使用 oAuth.net 库

  2. 请求似乎格式正确,我已逐步检查请求,没有发现任何错误。

  3. 尝试检查时间戳是否存在问题 - 这似乎是 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


【解决方案1】:

没有真正的回应。关闭它。

【讨论】:

  • 您找到解决方案了吗?
猜你喜欢
  • 2018-04-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-12-21
相关资源
最近更新 更多