gpt4 book ai didi

exchange-server - 更新约会会导致其更改为 EWS 1.1 中的 session

转载 作者:行者123 更新时间:2023-12-04 01:43:05 25 4
gpt4 key购买 nike

这是我想要做的:

  • 获取两个日期之间用户日历上的所有项目
  • 更新 LocationSubject对于某些项目

  • 我得到的物品:
    FindItemsResults<Appointment> findResults = calendar.FindAppointments(new CalendarView(startDate, endDate));
    此查询工作正常。但是每当我调用 Update 来保存项目时,我都会收到一个异常:
    Microsoft.Exchange.WebServices.Data.ServiceResponseException: One or more recipients are invalid.
    即使出现异常,该项目也已保存并更改为 IsMeeting设置为真!现在更新的项目是与组织者等的 session ......这对我来说实际上是数据损坏。

    这是代码。没有比这更复杂的了。我已经通过更改 Location 对其进行了测试或 Subject并且两者都会导致问题。
    Appointment a = Appointment.Bind(_service, new ItemId(id));
    a.Location = newLocation
    a.Update(ConflictResolutionMode.AlwaysOverwrite);

    我错过了一些概念还是什么?这似乎是一个非常严重的问题。

    FWIW,这是针对 Office 365 服务器的 EWS 1.1。

    最佳答案

    我在这个问题的帮助下想通了:

    Exchange Appointment Types

    关键是Update方法需要使用 SendInvitationsOrCancellationsMode.SendToNone 调用在第二个参数中设置的标志。

    像这样:

    a.Update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendToNone);

    关于exchange-server - 更新约会会导致其更改为 EWS 1.1 中的 session ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8275153/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com