Edit

Bagikan melalui


ServiceAuthorizationBehavior.ImpersonateCallerForAllOperations Property

Definition

Gets or sets a value that indicates whether the service performs impersonation for all the operations that it supports.

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

Property Value

true if the service performs impersonation for all the operations that it supports; otherwise, false. The default is false.

Exceptions

Behavior is read-only.

Examples

This code shows how to set this property.

// 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

Remarks

A value of false indicates that impersonation is specified for each operation.

Applies to