WorkflowUnhandledExceptionBehavior Class

WorkflowUnhandledExceptionBehavior Class

.NET Framework (current version)

A service behavior that enables you to specify the action to take when an unhandled exception occurs within a workflow service.

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


public class WorkflowUnhandledExceptionBehavior : IServiceBehavior


Initializes a new instance of the WorkflowUnhandledExceptionBehavior class.


Gets or sets the action to take when an unhandled exception occurs.

System_CAPS_pubmethodAddBindingParameters(ServiceDescription, ServiceHostBase, Collection<ServiceEndpoint>, BindingParameterCollection)

Implements the IServiceBehavior.AddBindingParameters method to support the behavior.

System_CAPS_pubmethodApplyDispatchBehavior(ServiceDescription, ServiceHostBase)

Implements the IServiceBehavior.ApplyDispatchBehavior method to support the behavior.


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)


Serves as the default hash function. (Inherited from Object.)


Gets the Type of the current instance.(Inherited from Object.)


Creates a shallow copy of the current Object.(Inherited from Object.)


Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodValidate(ServiceDescription, ServiceHostBase)

Implements the IServiceBehavior.Validate method to support the behavior.

Both OnUnhandledException and WorkflowUnhandledExceptionBehavior dictate the behavior of the runtime when an exception is not handled in the workflow; however, WorkflowUnhandledExceptionBehavior has the option of leaving a suspended workflow in the persistence store, while OnUnhandledException does not. The reason for this is that what happens to a suspended workflow is host-specific, and WorkflowApplication is not. To implement this functionality using WorkflowApplication, create a custom PersistenceParticipant that has this behavior.

For an example of how to use this behavior see Workflow Service Host Extensibility.

.NET Framework
Available since 4.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2016 Microsoft