none
Microsoft.Exchange.WebServices.Data.GetAttachmentResponse.get_Attachment() failed RRS feed

  • Question

  • I'm not sure if this is the right forum as this appears to be related to the EWS Managed API, however I'm attempting to use it in an outlook app following this example: https://msdn.microsoft.com/en-us/library/office/dn148008.aspx

    Everything APPEARS to work, the getAttachment.OverallResponse is a success, and in the immediate window in the debugger, I can get the value of attachmentResponse.Attachment without error.

    However, when I run the page, that same line (attachmentResponse.Attachment) throws the exception:

    Microsoft.Exchange.WebServices.Data.GetAttachmentResponse.get_Attachment() failed

    I have enabled mailbox read/write permissions, and again, in the debugger I can see the values in the immediate window, so what am I doing wrong that causes it to fail at runtime?

    Friday, May 8, 2015 1:31 AM

Answers

All replies

  • strange, I had added the original EWS api via nuget and was getting this error. I then installed the EWS API from this link https://www.microsoft.com/en-us/download/details.aspx?id=42951

    and suddenly it started working. I didn't reference it in the project or do anything else. so if you're having this problem try installing from that link, hopefully that does it!

    Friday, May 8, 2015 1:51 AM
  • Hi SelAromDotNet,

    I am glad you have resolved your issue, and thanks for sharing your solution.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, May 11, 2015 6:15 AM
  • Thanks so much, exactly the same issue. Weird it was exactly the same file size, version and... everything. However still needed overwriting with the link you gave.
    Tuesday, July 28, 2015 6:26 PM
  • That worked for me but still wondering why it is not working for when I tried with nuget.
    Tuesday, August 25, 2015 6:52 AM