ServiceAuthorizationBehavior Constructor

Definition

Initializes a new instance of the ServiceAuthorizationBehavior class.

C#
public ServiceAuthorizationBehavior();

Examples

The following code shows how to retrieve an instance of this class.

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

Remarks

Typically, applications do not call the constructor directly. Instead they retrieve an instance of this class by calling ServiceHostBase.Description.Behaviors.Find<ServiceAuthorizationBehavior>.

Applies to

Produit Versions
.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