共用方式為


ExceptionHandler.TransportExceptionHandler 屬性

定義

取得或設定應用程式定義域的目前傳輸 ExceptionHandler 實作。

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

屬性值

自訂 ExceptionHandler 物件,接收全域 Windows Communication Foundation (WCF) 傳輸中發生的未處理例外狀況。

備註

根據預設, TransportExceptionHandler 屬性會設定為 的值 AlwaysHandle ,因而忽略 WCF 傳輸內的未處理例外狀況。 將這個屬性為 ExceptionHandler 的執行個體來接收和回應這些例外狀況。

如果在全域 WCF 傳輸中發生未處理的例外狀況,並到達此處理程式,可能會危害應用程式域的狀態。 HandleException 可能會傳回 false 這些例外狀況,使應用程式終止。

適用於