Export (0) Print
Expand All

MessageQueueTransaction.Abort Method

Rolls back the pending internal transaction.

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

public void Abort()

ExceptionCondition
InvalidOperationException

The internal transaction you are attempting to roll back has not started.

MessageQueueException

An internal Message Queuing error occurs.

Abort marks the unsuccessful completion of a process begun at a call to Begin.

Typically, one makes a call to Begin within a Try...Catch exception-handling block, putting a call to Commit in the Try clause, and a call to Abort in the Catch clause.

Abort rolls back the entire transaction. This includes all messages sent or received after the call to Begin.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft