ServiceAuthorizationBehavior.ImpersonateCallerForAllOperations Property

Definition

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

C#
public bool ImpersonateCallerForAllOperations { get; set; }

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.

C#
// Code to create a ServiceHost not shown.
ServiceAuthorizationBehavior MyServiceAuthoriationBehavior =
    serviceHost.Description.Behaviors.Find<ServiceAuthorizationBehavior>();
MyServiceAuthoriationBehavior.ImpersonateCallerForAllOperations = true;

Remarks

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

Applies to

Proizvod Verzije
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1