Breyta

Deila með


ServiceAuthorizationBehavior Constructor

Definition

Initializes a new instance of the ServiceAuthorizationBehavior class.

public:
 ServiceAuthorizationBehavior();
public ServiceAuthorizationBehavior ();
Public Sub New ()

Examples

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

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

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