Cancelling Google calendar event by iCal

1.7k views Asked by At

I have used DDay.iCal library in .NET to send event.

Sending event is working fine and event can be added to Google calendar, but for cancelling the event, after sending cancellation email, event is still in Google calendar.

Could you please guide me how to cancel Google Calendar event with iCal?

This is my event file:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//ddaysoftware.com//NONSGML DDay.iCal 1.0//EN
BEGIN:VEVENT
DESCRIPTION:a
DTEND:20130820T180000
DTSTAMP:20130820T050748Z
DTSTART:20130820T180000
SEQUENCE:0
SUMMARY:a
UID:c7da09c3-12c3-4e6c-8ab4-4c9bdede2221
END:VEVENT
END:VCALENDAR

This is my Cancellation event file

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//ddaysoftware.com//NONSGML DDay.iCal 1.0//EN
METHOD:CANCEL
BEGIN:VEVENT
DESCRIPTION:acancel
DTEND:20130820T180000
DTSTAMP:20130820T050748Z
DTSTART:20130820T180000
SEQUENCE:1
STATUS:CANCELLED
SUMMARY:acancel
UID:c7da09c3-12c3-4e6c-8ab4-4c9bdede2221
END:VEVENT
END:VCALENDAR
2

There are 2 answers

2
Arnaud Quillaud On

You are missing some mandatory properties like ORGANIZER and ATTENDEE in both the original event and in the cancellation. See https://www.rfc-editor.org/rfc/rfc5546#section-3.2.5

Then, you dont indicate what the full email looks like. For example, do you have a method=CANCEL in the content-type of your icalendar bodypart ? Should be something like:

Content-Type: text/calendar; method=CANCEL; charset=UTF-8;component=vevent
0
Matthew Setter On

I have all the relevant information, but Google Calendar just duplicates the event, instead of removing it.