Compartilhar via


AuthorizationRule.Verbs Propriedade

Definição

Obtém os verbos associados ao 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 da propriedade

StringCollection

Uma StringCollection coleção que contém os verbos cuja autorização deve ser verificada.

Atributos

Exemplos

O exemplo de código a seguir mostra como acessar essa propriedade.

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

Comentários

A Verbs propriedade é uma lista separada por vírgulas de métodos de transmissão HTTP que recebem ou negam acesso ao recurso.

Aplica-se a