EWS:Appoitnment Item.Id.UniqueId不恒定 [英] EWS : Appoitnment Item.Id.UniqueId is not constant

查看:419
本文介绍了EWS:Appoitnment Item.Id.UniqueId不恒定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个奇怪的问题,当工作与EWS托管API 2.0与Exchange Server 2007 SP3,我面对的问题。

There is a weird problem I'm facing when working with EWS Managed API 2.0 with Exchange Server 2007 SP3.

当我创建一个约会,我保存它,我得到使用下面的code的ID:

When I create an appointment and I save it, I get its ID using the following code :

appointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);

appointment.Id.UniqueId;

和我保存在我的本地数据库,所以我以后可以用它来更新会议或取消。

and I store it in my local DB so I can later use it to update the meeting or cancel it.

后来,当我想找回冲突的会议我用下面的code:

Later when I want to retrieve the conflicting meetings 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);
  }

而当我想访问冲突的会议之一的ID,我觉得比ID我有它在我的本地数据库,尽管所有其他信息都相同又不同。我还可以用我的ID绑定到约会,但问题是,在同一次会议上,现在有2个不同的ID。为什么EWS不存储赴约一个唯一的ID原因和(appointment.Id.UniqueId)不是恒定的?

and when I want to access the ID of one of the conflicting meetings I find it different than the ID I have it in my local DB although all other information are the same. I still can use my ID to bind to the appointment, but the problem is that the same meeting now have 2 different IDs. Why EWS isn't storing a unique ID for appointments why and (appointment.Id.UniqueId)is not constant ?

我没有找到这个问题的明确解决方案。

I didn't find a clear solution for this problem.

推荐答案

这其实是面对那些谁使用EWS托管API一个非常普遍的问题。
出于某种原因(我不知道为什么),当约会被移动到另一个文件夹中的唯一ID的变化。
你可以在这里找到你的问题,在我的岗位你的答案:
<一href="http://stackoverflow.com/questions/11827152/exchange-web-services-why-is-itemid-not-constant-continued">Exchange Web服务:为什么ITEMID不是恒定的? [续]

This is Actually a very common problem faced by those who are using the EWS Managed API.
For some reason (I do not know why) the Unique ID changes when the appointment is moved to another folder.
You can find your question and your answer in my post here:
Exchange web services: why is ItemId not constant? [continued]

这篇关于EWS:Appoitnment Item.Id.UniqueId不恒定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆