I am trying to add calender to my account using .net API
I am using the following code

 CalendarEntry calendar = new CalendarEntry();
        calendar.Title.Text = "Hari's New";
        calendar.Summary.Text = "This calendar added though c# code.";
        calendar.TimeZone = "India";
        calendar.Hidden = false;
        calendar.Color = "#0000FF";
        calendar.Location = new Where("", "", "Kerala");

        try
        {
            Uri postUri = new Uri("http://www.google.com/calendar/
feeds/default/owncalendars/full");
            CalendarEntry createdCalendar = (CalendarEntry)
myService.Insert(postUri, calendar);
        }
        catch (Exception ex)
        {
            Response.Write(ex.ToString());
        }

myService  contains to authentication with my google username and pass
like

myService = new CalendarService("hkrk-testApp-1");
        myService.setUserCredentials("username", "passowrd");

But i am getting following error

Google.GData.Client.GDataRequestException: Execution of request
failed: 
http://www.google.com/calendar/feeds/default/owncalendars/full?gsessionid=lgRhg1rExeSzGeAPx7rPsA
---> System.Net.WebException: The remote server returned an error:
(400) Bad Request. at System.Net.HttpWebRequest.GetResponse() at
Google.GData.Client.GDataRequest.Execute() --- End of inner exception
stack trace --- at Google.GData.Client.GDataRequest.Execute() at
Google.GData.Client.GDataGAuthRequest.Execute(Int32 retryCounter) at
Google.GData.Client.GDataGAuthRequest.Execute() at
Google.GData.Client.Service.EntrySend(Uri feedUri, AtomBase baseEntry,
GDataRequestType type, AsyncSendData data) at
Google.GData.Client.Service.Insert(Uri feedUri, AtomEntry newEntry,
AsyncSendData data) at Google.GData.Client.Service.Insert[TEntry](Uri
feedUri, TEntry entry) at _Default.Button1_Click(Object sender,
EventArgs e) in c:\Inetpub\wwwroot\GoogleCalTest\Default.aspx.cs:line
43

can anyone help me in this?

--~--~---------~--~----~------------~-------~--~----~
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