Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DeliveryFailure Enumeration

Specifies the possible types of delivery failure for a message read from the queue.

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

'Declaration
Public Enumeration DeliveryFailure

Member nameDescription
UnknownAn unknown error occurred.
AccessDeniedThe sender does not have access rights to place messages in the destination queue.
BadDestinationQueueThe destination queue was not found.
BadEncryptionThe destination queue manager cannot decrypt the message.
BadSignatureThe destination queue manager cannot authenticate the message because the attached signature is invalid.
CouldNotEncryptThe source queue manager cannot encrypt the message.
HopCountExceededThe message hop count was exceeded, which indicates the number of intermediate servers.
NotTransactionalQueueA transactional message was sent to a nontransactional queue.
NotTransactionalMessageA nontransactional message was sent to a transactional queue.
PurgedThe message was purged before reaching the destination queue.
QueueDeletedThe destination queue was deleted before the message could be delivered to the application.
QueueExceedMaximumSizeThe message was not delivered because the destination queue is full.
QueuePurgedThe queue was purged and the message no longer exists.
ReachQueueTimeoutThe message did not reach the destination queue before timing out.
ReceiveTimeoutThe 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.


		<OperationBehavior(TransactionScopeRequired := True, TransactionAutoComplete := True)> _
		Public Sub SimpleSubmitPurchaseOrder(ByVal po As PurchaseOrder)
			Console.WriteLine("Submitting purchase order did not succeed ", po)
			Dim mqProp As MsmqMessageProperty = TryCast(OperationContext.Current.IncomingMessageProperties(MsmqMessageProperty.Name), MsmqMessageProperty)

			Console.WriteLine("Message Delivery Status: {0} ", mqProp.DeliveryStatus)
			Console.WriteLine("Message Delivery Failure: {0}", mqProp.DeliveryFailure)
			Console.WriteLine()
		End Sub


.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.

Community Additions

Show:
© 2017 Microsoft