问题
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