AuthorizationRule.Verbs Vlastnost

Definice

Získá příkazy přidružené k prostředku.

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

Hodnota vlastnosti

StringCollection

StringCollection Kolekce obsahující příkazy, jejichž autorizace musí být ověřena.

Atributy

Příklady

Následující příklad kódu ukazuje, jak získat přístup k této vlastnosti.

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

Poznámky

Vlastnost Verbs je čárkami oddělený seznam metod přenosu HTTP, které jsou uděleny nebo odepřeny přístup k prostředku.

Platí pro