Compartir a través de


AuthorizationRule.Verbs Propiedad

Definición

Obtiene los verbos asociados al recurso.

public:
 property System::Collections::Specialized::StringCollection ^ Verbs { System::Collections::Specialized::StringCollection ^ get(); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.CommaDelimitedStringCollectionConverter))]
[System.Configuration.ConfigurationProperty("verbs")]
public System.Collections.Specialized.StringCollection Verbs { get; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.CommaDelimitedStringCollectionConverter))>]
[<System.Configuration.ConfigurationProperty("verbs")>]
member this.Verbs : System.Collections.Specialized.StringCollection
Public ReadOnly Property Verbs As StringCollection

Valor de propiedad

StringCollection

Colección StringCollection que contiene los verbos para los que se debe comprobar la autorización.

Atributos

Ejemplos

En el ejemplo de código siguiente se muestra cómo obtener acceso a esta propiedad.

 // Using the AuthorizationRuleCollection Add method.

 // Set the action property.
 authorizationRule.Action = 
    AuthorizationRuleAction.Allow;
 // Define the new rule to add to the collection.
 authorizationRule.Users.Add("userName");
 authorizationRule.Roles.Add("admin");
 authorizationRule.Verbs.Add("POST");

 // Add the new rule to the collection.
 authorizationSection.Rules.Add(authorizationRule);
' Using the AuthorizationRuleCollection Add method.
' Set the action property.
  authorizationRule.Action = _
  AuthorizationRuleAction.Allow
' Define the new rule to add to the collection.
authorizationRule.Users.Add("userName")
authorizationRule.Roles.Add("admin")
authorizationRule.Verbs.Add("POST")

' Add the new rule to the collection.
authorizationSection.Rules.Add(authorizationRule)

Comentarios

La Verbs propiedad es una lista separada por comas de métodos de transmisión HTTP a los que se concede o se deniega el acceso al recurso.

Se aplica a