Closed GoogleCodeExporter closed 8 years ago
PASTING THE CONTENTS OF THE DOCX FILE HERE:
What steps will reproduce the problem?
Create a new ASP.NET WebService by creating a Web Method with below block of
code
to verify the login successful and retrieve authentication token
[WebMethod]
public string GetAuthToken()
{
DocumentsService gDOCService = new DocumentsService("SOMEAPP");
gDOCService.setUserCredentials("abcd@somedomain.com", "somepassword");
((GDataGAuthRequestFactory)gDOCService.RequestFactory).Proxy =
new WebProxy("12.18.0.17", 8080);
string authToken = gDOCService.QueryClientLoginToken();
return authToken;
}
This may hang and eventually timeout, especially in case of asp.net web service.
Proposed Fix: Step 1
Source File core\gauthrequest.cs
Method internal string QueryAuthToken(GDataCredentials gc)
The return call should be modified to pass a proxy from the request factory
return Utilities.QueryClientLoginToken(gdc,
this.factory.Service,
this.factory.ApplicationName,
this.factory.KeepAlive,
this.factory.Proxy,<- New parameter
authHandler);
Proposed Fix: Step 2
Source File core\utilities.cs
Method public static string QueryClientLoginToken
public static string QueryClientLoginToken(
GDataCredentials gc,
string serviceName,
string applicationName,
bool fUseKeepAlive,
IWebProxy proxyServer,<- New arameter
Uri clientLoginHandler
)
………………………
HttpWebRequest authRequest = WebRequest.Create(clientLoginHandler)
as HttpWebRequest;
authRequest.KeepAlive = fUseKeepAlive;
authRequest.Proxy = proxyServer;//assign the proxySerer
…………………………..
Original comment by ccherub...@google.com
on 25 Feb 2011 at 7:18
Can you please send a patch file for the proposed fix?
You can generate it by updating your source tree and then calling "svn diff".
Original comment by ccherub...@google.com
on 25 Feb 2011 at 7:19
Suggestion: instead of changing the actual QueryClientLoginToken method,
consider to add another signature to QueryClientLoginToken with one more
parameter: the web proxy.
See attached diff file.
Original comment by fht...@gmail.com
on 27 Feb 2011 at 8:38
Attachments:
I agree, infact thats the way I added the method overloads in my actual project.
I request the attached proxy.diff file can be taken to proceed with
implementation of the fix.
I am sorry, I am little unfamiliar with using the actual source tree and it
might delay this process if I need to generate this.
Original comment by j.chandr...@tcs.com
on 28 Feb 2011 at 7:08
Patch committed in rev. 1073
Thanks everyone!
Original comment by ccherub...@google.com
on 3 Mar 2011 at 4:02
Issue 371 has been merged into this issue.
Original comment by ccherub...@google.com
on 8 Mar 2011 at 2:36
When will the next build be made for the client library, with this change?
I really need this.
Original comment by chris.go...@gmail.com
on 11 Apr 2011 at 10:27
If you need it urgently, I'd recommend checking out the source as explained at
http://code.google.com/p/google-gdata/source/checkout and building it to
generate the updated dlls.
Original comment by ccherub...@google.com
on 11 Apr 2011 at 10:30
Original issue reported on code.google.com by
j.chandr...@tcs.com
on 25 Feb 2011 at 2:32Attachments: