绑定到使用Exchange Web服务进行更新的约会

时间:2015-05-07 13:49:47

标签: vb.net exchange-server exchangewebservices appointment

我正在VB .NET中编写同步服务,以将其他用户的日历同步到用户的邮箱中。虽然绑定到约会更新它,我遇到了一个问题,基本上我得到一条消息,建议访问被拒绝?虽然我可以阅读我正在更新的日历,但我可以在同一个日历中创建新条目。如果有人能够建议出现问题以及如何解决它,我会感激不尽,因为我在编写代码的方法上使用了MSDN注释,因为我正确绑定了它:

DestExchServer.ImpersonatedUserId = New ImpersonatedUserId(ConnectingIdType.PrincipalName, sDestinationUser)
sCurrentID = nlTempNode("id").InnerText

' **The error happens on the line below:**
appAppointment = Appointment.Bind(DestExchServer, New ItemId(sCurrentID))**

' Update the event bound to
appAppointment.Subject = nlTempNode("subject").InnerText
appAppointment.Location = nlTempNode("location").InnerText
appAppointment.Start = nlTempNode("startDateTime").InnerText
appAppointment.End = nlTempNode("endDateTime").InnerText
appAppointment.IsAllDayEvent = nlTempNode("allDayEvent").InnerText
appAppointment.Body = nlTempNode("body").InnerText
appAppointment.Sensitivity = nlTempNode("sensitivty").InnerText
appAppointment.Importance = nlTempNode("importance").InnerText
appAppointment.Update(ConflictResolutionMode.AlwaysOverwrite)
appAppointment = Nothing

0 个答案:

没有答案