ericzile / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

Code which works in .Net throws on Mono #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This code:

  SpreadsheetsService ss = new  
  SpreadsheetsService("A-B-1");

  SpreadsheetFeed feed = null;

  ss.setUserCredentials("user@mydomain.com", "mypassword");
  SpreadsheetQuery query = new SpreadsheetQuery();
  feed = ss.Query(query);

Works file using the client libraries version 1.1.0.0 on vista with MS C#
Express, but throws using mono 1.2.3.1 on Ubuntu (client libraries 1.1.1.0):

Unhandled Exception: 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.

Original issue reported on code.google.com by j.e.og...@googlemail.com on 24 Oct 2007 at 4:56

GoogleCodeExporter commented 9 years ago
I fixed this with a minor change in gauthrequest.cs.  See 

http://www.gotmono.com/cgi-bin/yabb/YaBB.pl?board=news;action=display;num=118063
3385
and
http://support.microsoft.com/kb/823177

adding the C# code from the KB article resolved it for me (presumably there's a
security impact - I don't know what sort of problem that is)

Original comment by j.e.og...@googlemail.com on 29 Oct 2007 at 6:06

GoogleCodeExporter commented 9 years ago
The fixes you are using/describing are related to SSL and redirection. Are you 
using SSL? (I have the code running 
fine under mono in my test envrionment, in fact the code is primarily developed 
under Mono). 

Trying to understand your situation. 

Original comment by fman...@gmail.com on 13 Nov 2007 at 2:22

GoogleCodeExporter commented 9 years ago
It is using SSL but so far as I'm aware, it's not because of anything I've done 
- 
I'm not overriding any of the default behaviour of the GData libraries, just 
literally trying to authenticate.  

The domain in use is a Google Apps domain, if that makes any difference?

James

Original comment by j.e.og...@googlemail.com on 13 Nov 2007 at 2:33

GoogleCodeExporter commented 9 years ago
I have to investigate that more. The blanket fix smells kind of dangerous for 
general
deployment. Are you blocked by this issue, or is this working out for you? 

Google Apps uses https for most of it's connections, so you might be running 
into the
SSL issue. 

Original comment by fman...@gmail.com on 15 Nov 2007 at 5:56

GoogleCodeExporter commented 9 years ago
Agreed - it has an air of accepting anything from anyone.

I'm not blocked on this.  The workaround is cool for me.

James

Original comment by j.e.og...@googlemail.com on 15 Nov 2007 at 6:03

GoogleCodeExporter commented 9 years ago
Ok, stupide question and a late comeback.. I was walking over this again, and i 
wondering if you did the 
mozroots thing? You need to accept root certificates for SSL to work, so maybe 
you were running into that?

Frank

Original comment by fman...@gmail.com on 22 Feb 2008 at 8:54

GoogleCodeExporter commented 9 years ago
The mozroots thing?  Not deliberately, since I've no idea what you're talking 
about!
This was on my Mac and on a hosted server.  The server *may* not have had ssl
installed, but probably did.  The Mac definately did because I use it all the 
time. 
Is that what you meant?

James

Original comment by j.e.og...@googlemail.com on 27 Feb 2008 at 10:03

GoogleCodeExporter commented 9 years ago
no, what i mean is:

-> the sign in/login process of the protocol will use SSL for communication. 
Hence you might run into SSL 
problems.

-> if you run MONO, by default it trusts NOONE. Hence, you need to tell MONO 
that it can trust a server. You 
can do that by:

mozroots --import --sync --quiet

which will install the most common certificates into your truststore. 

Original comment by fman...@gmail.com on 28 Feb 2008 at 7:13

GoogleCodeExporter commented 9 years ago
closing for stalenes

Original comment by fman...@gmail.com on 16 May 2008 at 10:33