EWS托管API:会话不是复制项上的IMailboxSession
我们正在使用EWS管理的API处理exchange公用文件夹中的项目。我们能够遍历文件夹,检索新项目并更改它们。可以将项目移动到特定文件夹,但当我们使用复制方法时,会发生奇怪的异常:发生内部服务器错误。操作失败。IdAndSession.MailboxSession:会话不是IMailboxSession 要排除代码问题,我使用microsoft提供的示例:EWS托管API:会话不是复制项上的IMailboxSession,api,exception,copy,exchange-server,exchangewebservices,Api,Exception,Copy,Exchange Server,Exchangewebservices,我们正在使用EWS管理的API处理exchange公用文件夹中的项目。我们能够遍历文件夹,检索新项目并更改它们。可以将项目移动到特定文件夹,但当我们使用复制方法时,会发生奇怪的异常:发生内部服务器错误。操作失败。IdAndSession.MailboxSession:会话不是IMailboxSession 要排除代码问题,我使用microsoft提供的示例: // As a best practice, limit the properties returned by the Bind meth
// As a best practice, limit the properties returned by the Bind method to only those that are required.
PropertySet propSet = new PropertySet(BasePropertySet.IdOnly, EmailMessageSchema.Subject, EmailMessageSchema.ParentFolderId);
// Bind to the existing item by using the ItemId.
// This method call results in a GetItem call to EWS.
EmailMessage originalMessage = EmailMessage.Bind(service, ItemId, propSet);
// Copy the orignal message into another folder in the mailbox and store the returned item.
Item item = originalMessage.Copy("epQ/3AAA=");
// Check that the item was copied by binding to the copied email message
// and retrieving the new ParentFolderId.
// This method call results in a GetItem call to EWS.
EmailMessage copiedMessage = EmailMessage.Bind(service, item.Id, propSet);
但例外情况仍然存在。这可能是框架中的一个bug吗?
提前感谢您的帮助