There is a strange problem that I encounter when working with EWS Managed API 2.0 with Exchange Server 2007 Service Pack 3 (SP3).
When I create a meeting and I save it, I get its identifier using the following code:
appointment.Save(SendInvitationsMode.SendToAllAndSaveCopy); appointment.Id.UniqueId;
and I store it in a local database, so I can use it later to update the meeting or cancel it.
Later, when I want to get conflicting collections, I use the following code:
CalendarView view = new CalendarView(Start, End); view.PropertySet = new PropertySet(); Folder rootfolder = Folder.Bind(service, WellKnownFolderName.Calendar); //view.PropertySet.Add(AppointmentSchema.Resources); view.PropertySet.Add(ItemSchema.Id); view.PropertySet.Add(AppointmentSchema.Subject); view.PropertySet.Add(AppointmentSchema.Start); view.PropertySet.Add(AppointmentSchema.Duration); view.PropertySet.Add(AppointmentSchema.End); view.PropertySet.Add(AppointmentSchema.Organizer); view.PropertySet.Add(AppointmentSchema.Id); Mailbox mailbox = new Mailbox(Email); FolderId id = new FolderId(WellKnownFolderName.Calendar, mailbox); CalendarFolder folder = CalendarFolder.Bind(service, id); FindItemsResults<Appointment> findResults = folder.FindAppointments(view); //Iterating through the conflicting meetings returned by folder.FindAppointments foreach (Appointment app in findResults.Items) { appts.Rows.Add(app.Subject, app.Start, app.End, app.Duration, app.Id.UniqueId); }
and when I want to access the ID of one of the conflicting collections, I find it different than the identifier that I have in my local database, although all the other data is the same. I can still use my ID to bind to the destination, but the problem is that at the same meeting there are now two different identifiers. Why does EWS not store a unique identifier for meetings, why and (destination .Id.UniqueId) is not permanent?
I did not find a clear solution to this problem.
source share