This documentation is archived and is not being maintained.

MsmqBindingBase.ReceiveErrorHandling Property

Gets or sets an enumeration value that specifies how poison messages are handled.

Namespace:  System.ServiceModel
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public ReceiveErrorHandling ReceiveErrorHandling { get; set; }

Property Value

Type: System.ServiceModel.ReceiveErrorHandling
A ReceiveErrorHandling value that specifies how poison and other messages that cannot be dispatched are handled.

A message in the queue becomes poisoned if repeated attempts to deliver the message failed. This poison message is eventually handled based on the setting of this property. When this property is set to Fault, the listener is faulted and a MsmqPoisonMessageException is traced and thrown. The poison message is left in the queue and must be removed before more messages can be accessed from the queue. The MsmqPoisonMessageException contains a MessageLookupId that can be used to identify and manually remove the poison message from the queue.

When this property is set to Drop, the poison message is dropped.

When this property is set to Reject, a negative acknowledgement is sent to the client and the poison message is removed from the queue. This option is available only on Message Queuing 4.0 and requires .

When set to Move, the poison message is moved to the final poison subqueue. This option is only available on Message Queuing 4.0 and requires .

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.