I figured it out, and thought I would document it for anybody else who has this problem.
To delete a calendar you own, use this URL (Note the OWNCALENDARS): http://www.google.com/calendar/feeds/default/owncalendars/full/[EMAIL PROTECTED] To delete a calendar you don't own, use this URL (Note the ALLCALENDARS): http://www.google.com/calendar/feeds/default/allcalendars/full/[EMAIL PROTECTED] Bob On Sep 16, 6:47 pm, Carver42 <[EMAIL PROTECTED]> wrote: > Hello, > > I am having a problem deleting a calendar. I am using .NET 2.0 and > Google, 1.2.2.0. I am getting this internal exception: "The remote > server returned an error: (500) Internal Server Error."; > > I have verified that I have the correct calendar ID. So, I figure I am > missing something simple. All feeds and entries are not null, and > appear to be the proper entry. I am the owner of the calendar, but it > is not 'selected' and I have not posted any events to it... > > I get the CalendarEntry here (the feed has 8 entries one of them is > the calendar I want to delete and it is returned): > > public CalendarEntry GetCalendarEntry(FxCalListItem item, string > eMail, string pw) { > CalendarQuery query = new CalendarQuery(); > query.Uri = new Uri("http://www.google.com/calendar/feeds/ > default/allcalendars/full"); > > // this just creates the service using eMail and pw, > creates the query and returns the feed > CalendarFeed feed = GetCalFeed(query, eMail, pw); > > if (feed == null) return null; > > foreach (CalendarEntry cal in feed.Entries) { > > if (GetCalendarID(cal) == item.GoogleCalID) { > > return cal; > > } > > } > return null; > } > this proc returns the CalendarEntry with the correct AURI, I looked up > the CalendarID on the calendar settings. > > Then I call this code: > > CalendarEntry cal = GetCalendarEntry(item. eMail, pw); > > if (cal != null) { > cal.Delete(); > Cursor.Current = oldCur; > return true; > } > > the calendarEntry is the correct entry, but I get an exception on the > delete here is the exception detail (at least part of it, it does not > include my stack and I mangled my calendar name): > > Google.GData.Client.GDataRequestException was unhandled > Message="Execution of request failed: > http://www.google.com/calendar/feeds/default/allcalendars/full/[EMAIL > PROTECTED]" > Source="Google.GData.Client" > ResponseString="Could not delete the calendar > [EMAIL PROTECTED]" > StackTrace: > 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.Delete(Uri uriTarget) > at Google.GData.Client.Service.Delete(AtomEntry entry) > at Google.GData.Client.AtomEntry.Delete() > ...... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
