views:

601

answers:

2

We are working on an asp.net 2.0 web app that emails users an ical to save to their outlook 2003 calendar. We noticed none of the code to update or delete an item seem to work even though the ical 2.0 spec supports it. We are curious if Outlook 2003 just ignores this? Does Outlook 2007 act differently?

We have situations where an event may change or be cancelled which fires off an email notification but the updated ical just adds a new event, it nevers deletes and or moves the original....

Are we missing something?

Thanks - Kevin

+1  A: 

We have been able to get it to delete a message now.... but not update the way we thought it would....

to setup a meeting we send...

BEGIN:VCALENDAR VERSION:2.0 METHOD:PUBLISH BEGIN:VEVENT CLASS:PUBLIC PRIORITY:5 SEQUENCE:0 UID:12345 SUMMARY:test LOCATION:test DTSTART:20090709T230000Z DTEND:20090710T000000Z DTSTAMP:20090713T164634Z DESCRIPTION:test END:VEVENT END:VCALENDAR

to delete we send a message by just changing the method to cancel like so:

BEGIN:VCALENDAR VERSION:2.0 METHOD:CANCEL BEGIN:VEVENT CLASS:PUBLIC PRIORITY:5 SEQUENCE:0 UID:12345 SUMMARY:test LOCATION:test DTSTART:20090709T230000Z DTEND:20090710T000000Z DTSTAMP:20090713T164634Z DESCRIPTION:test END:VEVENT END:VCALENDAR

Our original issue with the deleting is we had a blank organizer line. We removed that and canceling worked....

As for updating an original publish like in the first line, we have been unable to. We have increased the sequence # from zero to 1 and it just adds a new meeting. We are using the same UID number which in our testing is just 12345.

The only way I have found to do this is to create an organizer and change from publish to a request type.

In reading the rfc2445 this seems to be how it's designed. Publish will always create a new record and sequence doesn't matter. When sequence matters is with an organizer and request method....

I also found this answer after my testing and reading on stackoverflow here: http://stackoverflow.com/questions/45453/icalendar-and-event-updates-not-working-in-outlook

Duh for me not seeing that earlier.... :)

Here's a sample:

BEGIN:VCALENDAR VERSION:2.0 METHOD:REQUEST BEGIN:VEVENT CLASS:PUBLIC DTEND:20090713T203000Z DTSTAMP:20090713T174434Z DTSTART:20090713T200000Z ORGANIZER;CN="No one special";mailto:[email protected] PRIORITY:5 SEQUENCE:0 SUMMARY: Lunch? UID:1234567 END:VEVENT END:VCALENDAR

And to update it...

BEGIN:VCALENDAR VERSION:2.0 METHOD:REQUEST BEGIN:VEVENT CLASS:PUBLIC DTEND:20090713T213000Z DTSTAMP:20090713T174434Z DTSTART:20090713T210000Z ORGANIZER;CN="No one special";mailto:[email protected] PRIORITY:5 SEQUENCE:1 SUMMARY: Lunch? UID:1234567 END:VEVENT END:VCALENDAR

And to cancel it....

BEGIN:VCALENDAR VERSION:2.0 METHOD:CANCEL BEGIN:VEVENT CLASS:PUBLIC DTEND:20090713T213000Z DTSTAMP:20090713T174434Z DTSTART:20090713T210000Z ORGANIZER;CN="No one special";mailto:[email protected] PRIORITY:5 SEQUENCE:1 SUMMARY: Lunch? UID:1234567 END:VEVENT END:VCALENDAR

The sequence # doesn't matter for the cancelling....

A: 

I'd have to say my experiences with Outlook 2007 are the same as yours with Outlook 2003 .. it totally ignores PUBLISH..

The best way i've come around this is to use the meeting as an attachment.. that way you can open it, 'make it your own' and make use of Tracking and send out updates to attendee's ..

I don't think Microsoft is interested in playing nice with standards here..

Brunis