Export (0) Print
Expand All

ReceiveActivity.FaultMessage Property

The exception that is returned when a receive activity completes execution.

Namespace:  System.Workflow.Activities
Assembly:  System.WorkflowServices (in System.WorkflowServices.dll)

[BrowsableAttribute(true)]
public FaultException FaultMessage { get; set; }

Property Value

Type: System.ServiceModel.FaultException
A FaultException object that contains the fault message text and details.

If the FaultMessage property is set to an instance of type FaultException, the fault is returned to the client upon completion.

If an exception is thrown during the activity execution and the FaultMessage property is set, then the specified fault is returned to the client. If an exception is thrown during the activity execution and the FaultMessage property is set, and the associated operation has a FaultContractAttribute attribute that specifies a fault type that matches that of the FaultMessage property, then the channel is not faulted and the client can still communicate to the server. If the FaultMessage property is not set, the thrown exception is returned as a fault to the client.

The following code sample shows how to access the FaultMessage property.

ReceiveActivity receiveQuote;
receiveQuote = new ReceiveActivity();

FaultException message = receiveQuote.FaultMessage;

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.

.NET Framework

Supported in: 3.5

Community Additions

ADD
Show:
© 2015 Microsoft