Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
ServiceAuthorizationBehavior.ExternalAuthorizationPolicies Property
Definition
- Namespace:
- System.ServiceModel.Description
- Assembly:
- System.ServiceModel.dll
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.
Gets or sets a collection of external authorization policies.
public:
property System::Collections::ObjectModel::ReadOnlyCollection<System::IdentityModel::Policy::IAuthorizationPolicy ^> ^ ExternalAuthorizationPolicies { System::Collections::ObjectModel::ReadOnlyCollection<System::IdentityModel::Policy::IAuthorizationPolicy ^> ^ get(); void set(System::Collections::ObjectModel::ReadOnlyCollection<System::IdentityModel::Policy::IAuthorizationPolicy ^> ^ value); };
public System.Collections.ObjectModel.ReadOnlyCollection<System.IdentityModel.Policy.IAuthorizationPolicy> ExternalAuthorizationPolicies { get; set; }
member this.ExternalAuthorizationPolicies : System.Collections.ObjectModel.ReadOnlyCollection<System.IdentityModel.Policy.IAuthorizationPolicy> with get, set
Public Property ExternalAuthorizationPolicies As ReadOnlyCollection(Of IAuthorizationPolicy)
Property Value
A collection of external authorization policies.
Exceptions
Behavior is read-only.
Examples
The following code shows how to set this property to use a set of external authorization policies.
ServiceHost myServiceHost = new ServiceHost(typeof(Calculator), baseUri);
ServiceAuthorizationBehavior myServiceBehavior =
myServiceHost.Description.Behaviors.Find<ServiceAuthorizationBehavior>();
myServiceBehavior.PrincipalPermissionMode =
PrincipalPermissionMode.UseAspNetRoles;
MyServiceAuthorizationManager sm = new MyServiceAuthorizationManager();
myServiceBehavior.ServiceAuthorizationManager = sm;
Dim myServiceHost As New ServiceHost(GetType(Calculator), baseUri)
Dim myServiceBehavior As ServiceAuthorizationBehavior = myServiceHost.Description.Behaviors.Find(Of ServiceAuthorizationBehavior)()
myServiceBehavior.PrincipalPermissionMode = PrincipalPermissionMode.UseAspNetRoles
Dim sm As New MyServiceAuthorizationManager()
myServiceBehavior.ServiceAuthorizationManager = sm
Remarks
The external authorization policies participate in the policy evaluation process resulting in a user ServiceSecurityContext.
Applies to
Feedback
Was this page helpful?
