.NET Components for Mobility

NullReferenceException saving an attachment

Last post 03-25-2010 2:16 PM by penyaskito. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 03-25-2010 2:16 PM

    NullReferenceException saving an attachment

    Hi Peter,
    I have a NullReferenceException every time I try to save an attachment.
    My code is:
    if (attachment.DownloadState == DownloadState.FullItem) attachment.Save("\\TEMP\\" + attachment.Name);
    And the stacktrace:
    at InTheHand.IO.StreamHelper.CopyTo(Stream s, Stream destination, Int32 bufferSize) at InTheHand.IO.StreamHelper.CopyTo(Stream s, Stream destination) at InTheHand.WindowsMobile.PocketOutlook.Attachment.Save(String path)
    This test has been done with an IMAP account and it seems that the attachment is being downloaded correctly (the DownloadState takes a time to be FullItem).
    If you need more details just ask.
    Filed under: , , ,
Page 1 of 1 (1 items)
Copyright © 2001-2012 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy. OrcsWeb's Windows Cloud Server Hosting