The item you tried to access to longer exists

社会主义新天地 提交于 2019-12-11 18:57:54

问题


Here is the screen-shot of an email whose attachment I am trying to access.

When I try to open the attachment, I am getting the below error

What is the reason behind this, and how can this be solved?

I am trying to process emails using EWS api and my process is stuck on this email because while processing this email I am getting the below error(when Loading the MimeContent of this particular email).

this is the code

var message = EmailMessage.Bind(exchangeService, itemid,
                                       new PropertySet(
                                                       ItemSchema.Attachments));

    exchangeService.TraceListener=new TraceListener();
    exchangeService.TraceEnabled = true;
    message.Load(new PropertySet(ItemSchema.MimeContent)); // Getting exception here.
   //  File.WriteAllBytes("email.eml", message.MimeContent.Content);

And this is the error I am getting.

Microsoft.Exchange.WebServices.Data.ServiceRequestException occurred
HResult=-2146233088 Message=The request failed. Unable to read data from the transport connection: The connection was closed.
Source=Microsoft.Exchange.WebServices

来源:https://stackoverflow.com/questions/23196614/the-item-you-tried-to-access-to-longer-exists

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!