Microsoft.Exchange library exceptions? RRS feed

  • Question

  • Hi!

    I'm developing exchange transport agent and I encountered some problems with Microsoft.Exchange library. Problems described bellow occurred on my clients servers only. In my development environment and testing servers everything worked fine so it clearly concerns specific situations.

    1.  Trying to attach original incoming (external message) to newly created message by creating a copy:

    Cannot access a disposed object.
    Object name: 'MimePart'. Source: Microsoft.Exchange.Data.Common Call Stack:    
       at Microsoft.Exchange.Data.Mime.MimePart.ThrowIfDisposed()
       at Microsoft.Exchange.Data.Mime.MimePart.get_Headers()
       at Microsoft.Exchange.Data.Transport.Email.MimeTnefMessage.TnefCheck(MimePart candidate, Boolean isRoot)
       at Microsoft.Exchange.Data.Transport.Email.MimeTnefMessage.TnefCheck()
       at Microsoft.Exchange.Data.Transport.Email.MimeTnefMessage.get_HasTnef()
       at Microsoft.Exchange.Data.Transport.Email.MimeTnefMessage.get_MessageId()
       at Microsoft.Exchange.Data.Transport.Email.EmailMessage.get_MessageId()

    2. Submitting copy of a message to Exchange SMTP server (message was forked before)

    Operations not allowed on a deleted mail item Source: Microsoft.Exchange.Transport Call Stack:    
       at Microsoft.Exchange.Transport.Storage.Messaging.RecipientMailBase.ThrowIfDeleted()
       at Microsoft.Exchange.Transport.TransportMailItem.get_QueuePriority()
       at Microsoft.Exchange.Transport.TransportMailItem.CopyDeliveryPriorityFrom(IReadOnlyMailItem originalMailItem)
       at Microsoft.Exchange.Transport.SubmitHelper.InternalCreateTransportMailItemAndSubmit(IReadOnlyMailItem currentItem, EmailMessage message, String serverName, Version version, String agentName, Boolean suppressDSNs, Nullable`1 returnPath)
       at Microsoft.Exchange.Transport.Categorizer.CatServer.SubmitMessage(EmailMessage message)

    Any suggestions will be appreciated.

    Wednesday, December 28, 2011 9:30 AM

All replies

  • Hi,

    Did you ever get a resolution to your #2 issue "Operations not allowed on a deleted mail item"?

    I've encountered what looks to be a similar problem in a Transport Agent running on Exchange 2010, again involving processing a forked message. In our situation we're creating a new stand-alone message, and I can't see any relationship to the message we've created/submitting and the (forked) message we're processing.

    In the same scenario on Exchange 2007 (SP3), I can't repro the issue - but I don't know if that means it's specific to Exchange 2010, or that I don't fully understand the problem.

    Tuesday, March 19, 2013 3:32 PM