Edit

Share via


ExceptionHandler.TransportExceptionHandler Property

Definition

Gets or sets the current transport ExceptionHandler implementation for the application domain.

public:
 static property System::ServiceModel::Dispatcher::ExceptionHandler ^ TransportExceptionHandler { System::ServiceModel::Dispatcher::ExceptionHandler ^ get(); void set(System::ServiceModel::Dispatcher::ExceptionHandler ^ value); };
public static System.ServiceModel.Dispatcher.ExceptionHandler TransportExceptionHandler { get; set; }
static member TransportExceptionHandler : System.ServiceModel.Dispatcher.ExceptionHandler with get, set
Public Shared Property TransportExceptionHandler As ExceptionHandler

Property Value

A custom ExceptionHandler object that receives unhandled exceptions that occur within the global Windows Communication Foundation (WCF) transports.

Remarks

By default, the TransportExceptionHandler property is set to the value of AlwaysHandle, causing unhandled exceptions within WCF transports to be ignored. Set this property to an instance of ExceptionHandler to receive and react to these exceptions.

If an unhandled exception occurs within a global WCF transport and reaches this handler, there is a possibility that the state of the application domain is compromised. HandleException can return false for these exceptions to cause the application to be terminated.

Applies to