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 指示为每个操作指定模拟。

适用于