在 Exchange 中处理 EWS 中的与删除相关的错误Handling deletion-related errors in EWS in Exchange

了解如何处理通过在 Exchange 中使用 EWS 托管 API 或 EWS 开发的应用程序中与删除相关的错误。Find out how to handle deletion-related errors in applications that you develop by using the EWS Managed API or EWS in Exchange.

如果您的应用程序删除项目和文件夹,则可能需要处理与删除相关的错误。If your application deletes items and folders, you might have to handle deletion-related errors. 您可以处理这些错误在运行时,或者开发 EWS 应用程序时。You can handle these errors at runtime, or while you are developing your EWS application.

表1:与删除相关的错误及其处理方法Table 1: Deletion-related errors and how to handle them

ErrorError 当您尝试 .。。Occurs when you try to… 处理它的...Handle it by…
ErrorAffectedTaskOccurrencesRequiredErrorAffectedTaskOccurrencesRequired
删除定期任务的实例,并且不设置AffectedTaskOccurrence属性。Delete an instance of a recurring task, and the AffectedTaskOccurrence property is not set.
设置AffectedTaskOccurrence属性,然后重试删除。Setting the AffectedTaskOccurrence property, and retrying the deletion.
ErrorCalendarCannotUpdateDeletedItemErrorCalendarCannotUpdateDeletedItem
更新将导致向与会者发送会议邀请时,更新 "已删除邮件" 文件夹中的 "日历" 项目。Update a calendar item located in the Deleted Items folder when the update would result in sending a meeting invite to attendees.
取消更新或将日历项目移回默认的 "日历" 文件夹,并更新 "日历" 项目。Canceling the update or moving the calendar item back to the default Calendar folder and updating the calendar item.
ErrorCalendarOccurrenceIsDeletedFromRecurrenceErrorCalendarOccurrenceIsDeletedFromRecurrence
引用定期约会的已删除事件。Reference a deleted occurrence of a recurring appointment.
删除对已删除事件的引用。Removing a reference to a deleted occurrence.
ErrorCannotDeleteObjectErrorCannotDeleteObject
删除无法删除的项目。Delete an item that cannot be deleted.
退出删除项目的尝试。Quitting attempts to delete the item.
ErrorCannotDeleteTaskOccurrenceErrorCannotDeleteTaskOccurrence
删除非定期任务的事件或删除定期任务的最后一个事件。Delete an occurrence of a nonrecurring task or delete the last occurrence of a recurring task.
删除非定期任务或退出删除定期任务的最后一个事件的尝试。Deleting a nonrecurring task or quitting attempts to delete the last occurrence of a recurring task.
ErrorDeleteDistinguishedFolderErrorDeleteDistinguishedFolder
删除可分辨文件夹。Delete a distinguished folder.
指示不能删除默认文件夹。Indicating that default folders cannot be deleted.
ErrorItemNotFoundErrorItemNotFound
访问永久删除的项目。Access a permanently deleted item.
从存储区中删除对项的引用。Removing references to an item when it is deleted from the store. 如果某项已恢复,请确保恢复对客户端所需的引用。If an item is recovered, make sure that you reinstate required references to the client.
ErrorSendMeetingCancellationsRequiredErrorSendMeetingCancellationsRequired
删除日历项目,而不指定是否应发送会议取消。Delete a calendar item without specifying whether meeting cancellations should be sent.
指定应发送还是不应发送会议取消通知。Specifying that meeting cancellations should or should not be sent.

另请参阅See also