Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

.net - Accessing Google Spreadsheets with C# using Google Data API fails with Mono

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);

This should return a feed with a list of spreadsheets. However this fails with:

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.

Some further information:

  1. I'm not behind a firewall
  2. I have checked my username (maurits.rijk at gmail.com) and password several times
  3. I am using Mandriva in VirtualBox on a MacBook
  4. All my code is compiled with Mono

I tried the same functionality in Java on OS-X. That code runs as expected.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Looks like a Mono problem to me.
Could you test with fiddler to test if your call reach the server?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...