访问谷歌小号preadsheets使用谷歌数据API C#失败,单 [英] Accessing Google Spreadsheets with C# using Google Data API fails with Mono
问题描述
我试图访问使用的GData API,我的谷歌小号preadsheets。我按照它看起来像例如:
I'm trying to access my Google spreadsheets using the GData API. I have followed the example which looks like:
var service = new SpreadsheetsService("myTest");
service.setUserCredentials(username, password);
var query = new SpreadsheetQuery();
var feed = service.Query(query);
这应该返回一个饲料第preadsheets列表。然而,这将失败,并:
This should return a feed with a list of spreadsheets. However this fails with:
Google.GData.Client.GDataRequestException:请求执行失败:的 HTTP://s$p$padsheets.google.com/feeds/s$p$padsheets/private/full ---> System.Net.WebException:远程服务器返回错误:( 404)未找到。
Google.GData.Client.GDataRequestException: Execution of request failed: http://spreadsheets.google.com/feeds/spreadsheets/private/full ---> System.Net.WebException: The remote server returned an error: (404) Not Found.
当我直接在浏览器试试上面的链接,我可以下载的饲料,只要我登录到我的谷歌帐户。
When I try the above link directly in my browser I'm able to download the feed, as long as I'm logged in into my Google account.
一些进一步的信息:
- 我不是在防火墙后面
- 在我已经检查了我的用户名(maurits.rijk在gmail.com)和密码多次
- 我在MacBook上使用的Mandriva在VirtualBox中
- 在我所有的code编译具有单声道
我试图在Java中的OS-X相同的功能。这code运行正常。
I tried the same functionality in Java on OS-X. That code runs as expected.
推荐答案
我发现的谷歌code,第88 为注释8。
总之,使用
mozroots --import --sync --quiet
mozroots --import --sync --quiet
解决了这个问题。对我来说,现在的作品。
solves this problem. For me it now works.
这篇关于访问谷歌小号preadsheets使用谷歌数据API C#失败,单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!