What version number of the .NET libraries are you using? There was a  
bug fixed in November last year where the Proxy was not applied  
during authentication?

Frank Mantek
Google
On Sep 5, 2007, at 11:14 PM, Bobby wrote:

>
> Hello Lane :
>
> Thanks for your response. This is the error I am getting. I tried your
> code also and I get the same error. Please HELP !!!!
>
> Thanks,
>
> Dipankar
>
> Unhandled Exception: Google.GData.Client.AuthenticationException:
> Error authenticating (check service name)
>  at Google.GData.Client.GDataGAuthRequest.Execute(Int32 iRetrying)
>  at Google.GData.Client.GDataGAuthRequest.Execute()
>  at Google.GData.Client.Service.Query(Uri queryUri)
>  at Google.GData.Client.Service.Query(FeedQuery feedQuery)
>  at Google.GData.Calendar.CalendarService.Query(EventQuery feedQuery)
>  at googleAp01.Program.Main(String[] args) in
> C:\dbiswas\MyProject\VStudioWS\googleAp01\googleAp01\Program.cs:line
> 56
>
> On 9/5/07, Lane LiaBraaten (Google) <[EMAIL PROTECTED]> wrote:
>>
>> Hi Dipankar,
>>
>> Your code looks correct, but maybe the .NET framework is not  
>> detecting
>> the correct proxy.  You can use the following to specify the proxy
>> manually:
>>
>> WebProxy myProxy = new WebProxy("http://my.proxy.example.com:
>> 3128/",true);
>>
>> If that doesn't help, please try to post more information about the
>> problem, such as what error you are getting or the contents of your
>> network traffic.
>>
>> Cheers,
>> Lane
>>
>> On Sep 5, 11:47 am, "[EMAIL PROTECTED]"
>> <[EMAIL PROTECTED]> wrote:
>>> Hello,
>>>
>>> I am trying to find some sample code that will allow me to query
>>> Google Calendar via .net API interface. I am able to query when I
>>> don't have Proxy server. But unable to do it when behind the proxy
>>> server. I have modified the query to take credentials for proxy  
>>> server
>>> but some how I can't get my code working. Can you please help me
>>> out... I have spend 2 days in this problem and I am still unable to
>>> resolve.
>>>
>>> It would be nice, if some body has a working copy of a program that
>>> goes thru Proxy Server. Because I did many search and did not find a
>>> working copy.
>>>
>>> Thanks in advance.
>>>
>>> Dipankar Biswas
>>>
>>> Here is my code :
>>> =============
>>> using System;
>>> using System.Collections;
>>> using System.ComponentModel;
>>> using System.Collections.Generic;
>>> using System.Text;
>>> using System.Data;
>>> using System.Net;
>>> using Google.GData.Client;
>>> using Google.GData.Extensions;
>>> using Google.GData.Calendar;
>>>
>>> namespace googleAp01
>>> {
>>>     class Program
>>>     {
>>>
>>>         static void Main(string[] args)
>>>         {
>>>
>>>             string calendarURI = "http://www.google.com/calendar/ 
>>> feeds/
>>> [EMAIL PROTECTED]/private/full";
>>>             string userName = "[EMAIL PROTECTED]";
>>>             string passWord = "MyGooglePassowrdGoesHere";
>>>
>>>             string proxyAddress = "http://MyProxyURL:8080";;
>>>             string proxyuserName = "MyProxyUserID";
>>>             string proxypassWord = "MyProxyPassword";
>>>
>>>             Console.WriteLine(calendarURI);
>>>             Console.WriteLine(userName);
>>>             Console.WriteLine(passWord);
>>>
>>>             CalendarService s = new CalendarService("CalendarTest");
>>>             s.setUserCredentials(userName, passWord);
>>>             EventQuery query = new EventQuery();
>>>
>>>             query.Uri = new Uri("http://www.google.com/calendar/ 
>>> feeds/
>>> [EMAIL PROTECTED]/private/full");
>>>             query.StartTime = DateTime.Now.AddDays(-28);
>>>             query.EndTime = DateTime.Now.AddMonths(6);
>>>
>>>             GDataRequestFactory f =
>>> (GDataRequestFactory)s.RequestFactory;
>>>             IWebProxy iproxy = WebRequest.DefaultWebProxy;
>>>             WebProxy myproxy = new
>>> WebProxy(iproxy.GetProxy(query.Uri));
>>>             myproxy.Credentials =  
>>> CredentialCache.DefaultCredentials;
>>>             myproxy.UseDefaultCredentials = true;
>>>
>>>             f.Proxy = myproxy;
>>>
>>>             EventFeed calFeed = s.Query(query) as EventFeed;
>>>
>>>             // now populate the calendar
>>>             while (calFeed != null && calFeed.Entries.Count > 0)
>>>             {
>>>                 // look for the one with dinner time...
>>>                 foreach (EventEntry entry in calFeed.Entries)
>>>                 {
>>>                     Console.WriteLine(entry);
>>>                 }
>>>             }
>>>         }
>>>     }
>>>
>>> }
>>>
>>> ==============================
>>
>>
>>>
>>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Calendar Data API" group.
To post to this group, send email to 
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to