ServiceAuthorizationBehavior.PrincipalPermissionMode Property

Definition

Obtiene o establece el modo de permiso de la entidad de seguridad.Gets or sets the principal permission mode.

public:
 property System::ServiceModel::Description::PrincipalPermissionMode PrincipalPermissionMode { System::ServiceModel::Description::PrincipalPermissionMode get(); void set(System::ServiceModel::Description::PrincipalPermissionMode value); };
public System.ServiceModel.Description.PrincipalPermissionMode PrincipalPermissionMode { get; set; }
member this.PrincipalPermissionMode : System.ServiceModel.Description.PrincipalPermissionMode with get, set
Public Property PrincipalPermissionMode As PrincipalPermissionMode

Property Value

PrincipalPermissionMode

El modo de permiso de la entidad de seguridad.The principal permission mode.

Examples

Este código muestra cómo establecer esta propiedad.This code shows how to set this property.

ServiceHost myServiceHost = new ServiceHost(typeof(Calculator), baseUri);
ServiceAuthorizationBehavior myServiceBehavior =
    myServiceHost.Description.Behaviors.Find<ServiceAuthorizationBehavior>();
myServiceBehavior.PrincipalPermissionMode =
    PrincipalPermissionMode.UseAspNetRoles;
Dim myServiceBehavior As ServiceAuthorizationBehavior
myServiceBehavior = _
   myServiceHost.Description.Behaviors.Find(Of ServiceAuthorizationBehavior)()
myServiceBehavior.PrincipalPermissionMode = _
   PrincipalPermissionMode.UseAspNetRoles

Remarks

Esta propiedad contiene uno de los miembros de la enumeración PrincipalPermissionMode.This property contains one of the members of the PrincipalPermissionMode enumeration. Los valores válidos son:Valid values are:

  • Custom.Custom. Una implementación de IAuthorizationPolicy personalizada se utiliza para rellenar Thread.CurrentPrincipal.A custom IAuthorizationPolicy implementation is used to populate Thread.CurrentPrincipal.

  • None.None. La propiedad Thread.CurrentPrincipal no se ha establecido.The Thread.CurrentPrincipal property is not set.

  • UseAspNetRoles.UseAspNetRoles. La propiedad Thread.CurrentPrincipal está establecida como IPrincipal basada en información de funciones de ASP.NET.The Thread.CurrentPrincipal property is set to an IPrincipal based on ASP.NET role information.

  • UseWindowsGroups.UseWindowsGroups. La propiedad Thread.CurrentPrincipal está establecida como WindowsPrincipal en función de las credenciales de usuario del mensaje entrante.The Thread.CurrentPrincipal property is set to a WindowsPrincipal based on the user credentials of the incoming message.

Applies to

See also