Share via


ServiceAuthorizationBehavior.ImpersonateCallerForAllOperations 屬性

定義

取得或設定值,這個值會指出服務是否針對支援的所有作業執行模擬。

public:
 property bool ImpersonateCallerForAllOperations { bool get(); void set(bool value); };
public bool ImpersonateCallerForAllOperations { get; set; }
member this.ImpersonateCallerForAllOperations : bool with get, set
Public Property ImpersonateCallerForAllOperations As Boolean

屬性值

Boolean

如果服務對支援的所有作業執行模擬則為 true,否則為 false。 預設為 false

例外狀況

行為是唯讀的。

範例

這段程式碼將示範如何設定這個屬性。

// Code to create a ServiceHost not shown.
ServiceAuthorizationBehavior MyServiceAuthoriationBehavior =
    serviceHost.Description.Behaviors.Find<ServiceAuthorizationBehavior>();
MyServiceAuthoriationBehavior.ImpersonateCallerForAllOperations = true;
' Code to create a ServiceHost not shown.
Dim MyServiceAuthoriationBehavior As ServiceAuthorizationBehavior 
MyServiceAuthoriationBehavior= serviceHost.Description.Behaviors.Find _
(Of ServiceAuthorizationBehavior)()
MyServiceAuthoriationBehavior.ImpersonateCallerForAllOperations = True

備註

false 值表示已對每個作業指定模擬。

適用於