DeliveryFailure Enumeration
Specifies the possible types of delivery failure for a message read from the queue.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
| Member name | Description | |
|---|---|---|
| Unknown | An unknown error occurred. | |
| AccessDenied | The sender does not have access rights to place messages in the destination queue. | |
| BadDestinationQueue | The destination queue was not found. | |
| BadEncryption | The destination queue manager cannot decrypt the message. | |
| BadSignature | The destination queue manager cannot authenticate the message because the attached signature is invalid. | |
| CouldNotEncrypt | The source queue manager cannot encrypt the message. | |
| HopCountExceeded | The message hop count was exceeded, which indicates the number of intermediate servers. | |
| NotTransactionalQueue | A transactional message was sent to a nontransactional queue. | |
| NotTransactionalMessage | A nontransactional message was sent to a transactional queue. | |
| Purged | The message was purged before reaching the destination queue. | |
| QueueDeleted | The destination queue was deleted before the message could be delivered to the application. | |
| QueueExceedMaximumSize | The message was not delivered because the destination queue is full. | |
| QueuePurged | The queue was purged and the message no longer exists. | |
| ReachQueueTimeout | The message did not reach the destination queue before timing out. | |
| ReceiveTimeout | The message was not delivered to the application on time. |
You can get the DeliveryFailure property to determine why a message failed delivery and was sent to the dead-letter queue. For additional information about message processing in a dead-letter queue, see Using Dead-Letter Queues to Handle Message Transfer Failures.
The example below shows how to access the DeliveryFailure of a message within a service operation.
public void SimpleSubmitPurchaseOrder(PurchaseOrder po) { Console.WriteLine("Submitting purchase order did not succeed ", po); MsmqMessageProperty mqProp = OperationContext.Current.IncomingMessageProperties[MsmqMessageProperty.Name] as MsmqMessageProperty; Console.WriteLine("Message Delivery Status: {0} ", mqProp.DeliveryStatus); Console.WriteLine("Message Delivery Failure: {0}", mqProp.DeliveryFailure); Console.WriteLine(); }
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.