ServiceAuthorizationBehavior.ImpersonateCallerForAllOperations Property

 

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

Namespace:   System.ServiceModel.Description
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public bool ImpersonateCallerForAllOperations { get; set; }

Property Value

Type: System.Boolean

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

Exception Condition
InvalidOperationException

Behavior is read-only.

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

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;

.NET Framework
Available since 3.0
Return to top
Show: