title: Getting a EmailMessage Attachment via FileStreamResult
body: <p>I have this code here where I retrieve an attachment from an Email Message that is on the Exchange Server using EWS</p>
  
  <pre><code>            Attachment attachment = message.Attachments.Single(att =&gt; att.ContentId == Request.QueryString["cid"]);
              attachment.Load();
              FileAttachment fileAttachment = attachment as FileAttachment;
  
  
              fileAttachment.Load();
              byte[] bytes = fileAttachment.Content;
              Stream theMemStream = new MemoryStream();
  
              theMemStream.Write(bytes, 0, bytes.Length);
  
              return new FileStreamResult( theMemStream, attachment.ContentType);
  </code></pre>
  
  <p>I can download the file just fine however they are corrupted... Is there something I'm missing?</p>