.NET Components for Mobility

ObjectDisposedException when reading EmailMessageSubject with 4.0

Last post 02-09-2010 1:52 PM by penyaskito. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 01-26-2010 4:46 AM

    ObjectDisposedException when reading EmailMessageSubject with 4.0

    Hi,
    I'm testing an app developed with ITH 3.3 with ITH 4.0, and I found a problem that didn't happen in 3.3.
    I have a ObjectDisposedException when trying to read a EmailMessage Subject property. The exception message is "Message".
    Subject = '((InTheHand.WindowsMobile.PocketOutlook.EmailMessage)(value)).Subject' threw an exception of type 'System.ObjectDisposedException'
    The ITH related stacktrace is:
    at InTheHand.WindowsMobile.PocketOutlook.Message.get_Properties()
    at InTheHand.WindowsMobile.PocketOutlook.EmailMessage.get_Subject()
    What I'm doing is creating a List and adding there some EmailMessages. Once they are added, the Subject property throws the Exception.
    Thanks for any help.
  • 02-03-2010 1:34 PM In reply to

    Re: ObjectDisposedException when reading EmailMessageSubject with 4.0

    Thanks, I am looking into this. Is the parent OutlookSession still active, did you dispose of the folder after placing the messages in the list?

    Peter

    Peter Foot
    Microsoft Device Application Development MVP
    www.peterfoot.net | www.inthehand.com
  • 02-03-2010 4:02 PM In reply to

    Re: ObjectDisposedException when reading EmailMessageSubject with 4.0

    Hi Peter, Nope, I haven't disposed the folder, and I have not wrapped it in an "using" block neither, if you ask. The parent session is active too. As a workaround, I created my own mail DTO and copied the fields I needed there.
  • 02-03-2010 5:37 PM In reply to

    Re: ObjectDisposedException when reading EmailMessageSubject with 4.0

    Can you send me a code snippet of how you are using the EmailMessage so that I can investigate further. The only scenario where the Properties collection should return ObjectDisposedException is where Dispose has been called on the Message - either directly or via the GC.

    Peter

    Peter Foot
    Microsoft Device Application Development MVP
    www.peterfoot.net | www.inthehand.com
  • 02-09-2010 1:52 PM In reply to

    Re: ObjectDisposedException when reading EmailMessageSubject with 4.0

    I'll try to create a simple failing test.
Page 1 of 1 (5 items)
Copyright © 2001-2010 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy.