ExceptionHandler.AsynchronousThreadExceptionHandler 屬性

定義

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

public:
 static property System::ServiceModel::Dispatcher::ExceptionHandler ^ AsynchronousThreadExceptionHandler { System::ServiceModel::Dispatcher::ExceptionHandler ^ get(); void set(System::ServiceModel::Dispatcher::ExceptionHandler ^ value); };
public static System.ServiceModel.Dispatcher.ExceptionHandler AsynchronousThreadExceptionHandler { [System.Security.SecurityCritical] [System.Security.SecurityTreatAsSafe] get; [System.Security.SecurityCritical] [System.Security.SecurityTreatAsSafe] set; }
public static System.ServiceModel.Dispatcher.ExceptionHandler AsynchronousThreadExceptionHandler { get; set; }
[<get: System.Security.SecurityCritical>]
[<get: System.Security.SecurityTreatAsSafe>]
[<set: System.Security.SecurityCritical>]
[<set: System.Security.SecurityTreatAsSafe>]
static member AsynchronousThreadExceptionHandler : System.ServiceModel.Dispatcher.ExceptionHandler with get, set
static member AsynchronousThreadExceptionHandler : System.ServiceModel.Dispatcher.ExceptionHandler with get, set
Public Shared Property AsynchronousThreadExceptionHandler As ExceptionHandler

屬性值

指派自訂 ExceptionHandler 物件,以接收非同步 Windows Communication Foundation (WCF) 執行緒上發生的未處理的例外狀況。

屬性

備註

根據預設, AsynchronousThreadExceptionHandler 屬性為 null ,且非同步 WCF 執行緒上未處理的例外狀況會終止應用程式。 將這個屬性設定為 ExceptionHandler 物件,便可接收和回應這些例外狀況。

如果在非同步 WCF 執行緒上發生未處理的例外狀況,並到達此處理程式,應用程式域的狀態可能會遭到入侵。 HandleException 不應該傳回 true 這些例外狀況。

適用於