ServiceAuthorizationBehavior Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.