Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

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.
ExceptionCondition
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;

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.