AuthorizationRule.Verbs Özellik

Tanım

Kaynakla ilişkili fiilleri alır.

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

Özellik Değeri

StringCollection

StringCollection Yetkilendirmesi doğrulanması gereken fiilleri içeren bir koleksiyon.

Öznitelikler

Örnekler

Aşağıdaki kod örneği, bu özelliğe nasıl eriş yapılacağını gösterir.

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

Açıklamalar

Verbs özelliği, kaynağa erişimi verilen veya reddedilen HTTP iletim yöntemlerinin virgülle ayrılmış bir listesidir.

Şunlara uygulanır