Hi,

I'm maintaining a .Net application that makes use of the Google Calendar API 
to visualize bookings and events. It uses multiple calendars to organize 
different categories of events, and all those calendars are contained under 
the same google user account.

Since the beginning or April, the HTTP 500 Internal Server Error has reared 
its ugly head many a time when trying to update information about events. 
Currently, Google Calendar fails us more than it comes through. While 
searching the web for solutions, I read a post that suggested that too much 
activity on an account could cause it to lock down and become "read only". 
That explanation doesn't make sense to me, though, since I'm still able to 
run unit tests that are consistently successful when adding new events to a 
calendar, but then provoke the error, not only when trying to update or 
delete an event, but also when merely querying an event by its EventId (this 
should be possible even if the account is read-only, no?).

The following are examples of code that prompt this error.


EXAMPLE 1:
string eventUri = 
string.Format("http://www.google.com/calendar/feeds/{0}/private/full/{1}";, 
calendarId, eventId);
AtomEntry entry = Service.Get(eventUri);   // ERROR


EXAMPLE 2:
foreach (EventEntry entry in entries) //collection of EventEntry
{
       // do something
       entry.Delete() or entry.Update()      // ERROR
}


BUT CREATING NEW EVENTS ALWAYS WORKS:
            string calendarUri = 
string.Format("http://www.google.com/calendar/feeds/{0}/private/full";, 
calendarId);
            
            EventQuery query = new EventQuery(calendarUri);
            EventFeed feed = Service.Query(query);

            //create the new event
            EventEntry entry = new EventEntry(
                item.Course.Title + " - " + item.Course.Level, 
                item.Course.Description, 
                item.Location.Site.Name + " - " + item.Location.Name
            );
            entry.Times.Clear();
            entry.Times.Add(new Google.GData.Extensions.When
            {
                StartTime = date.StartTime,
                EndTime = date.EndTime
            });

            //insert the event into the calendar
            EventEntry newEntry = feed.Insert(entry);   // NEVER EVER FAILS


Could someone offer some insight into what's going on?
Many thanks,
S

-- 
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://code.google.com/apis/calendar/community/forum.html

Reply via email to