问题描述
我们正在使用EWS托管API处理我们的交换公用文件夹中的项目。我们能够遍历文件夹,检索新项目并进行更改。可以将项目移动到特定文件夹,但是当我们使用复制方法时,会发生奇怪的异常:发生内部服务器错误。操作失败。,IdAndSession.MailBoxSession:会话不是IMailBoxSession
要排除代码问题,我使用Microsoft提供的示例:
// 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);
Source 但是仍然发生异常。这可能是Framework中的错误吗? 预先感谢您的帮助。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)