What is the error you are getting? If the entry is readOnly, the exception
would indicate that. Otherwise you might be running into a different issue
on ASP.NET (glancing over your code, this in theory looks like it should
work fine).

What helps is:

- if this is a local exception, exception details.
- if data was send to google and the google service returns an error, that
error.

Frank Mantek
Google

On 5/20/07, cederstrom <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I don't get it, I fetch a list over calendars which work fine, then I
> attempt to post a new event to my calendars and I get an error. I
> think the problem is the uri, i searched everywhere and i think it
> might be read only?
>
> But how to get a write-able uri?
>
> For my first calendar (Default calendar):
> I get "http://www.google.com/calendar/feeds/default/<EMAIL>" as
> selfUri, but i figure I should somehow get
> http://www.google.com/calendar/feeds/<EMAIL>/private/full
>
> Hope someone can help me fetch the right uri, somehow?
>
>         CalendarService googleService = new
> CalendarService("Test2Google");
>         googleService.setUserCredentials("MY-EMAIL", "PASSWORD");
>
>         FeedQuery query = new FeedQuery();
>         query.Uri = new Uri("http://www.google.com/calendar/feeds/
> default");
>
>         // Tell the service to query:
>         AtomFeed calFeed = googleService.Query(query);
>
>         Google.GData.Calendar.EventEntry entry;
>         foreach (AtomEntry calendar in calFeed.Entries)
>         {
>             entry = new Google.GData.Calendar.EventEntry();
>
>             // Set the author of this entry.
>             AtomPerson author = new AtomPerson(AtomPersonType.Author);
>             author.Name = "Author - Test";
>             author.Email = "[EMAIL PROTECTED]";
>             entry.Authors.Add(author);
>
>             // Set the title and content of the entry.
>             entry.Title.Text = "Entry Title";
>             entry.Content.Content = "Entry Content";
>
>             When newWhen = new When();
>             newWhen.StartTime = DateTime.Now;
>             newWhen.EndTime = DateTime.Now;
>             entry.Times.Add(newWhen);
>
>             // Send the request and receive the response:
>             AtomEntry insertedEntry = googleService.Insert(new
> Uri(calendar.SelfUri.ToString()), 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