AuthorizationRule.Verbs Property
.NET Framework (current version)
Gets the verbs associated with the resource.
Assembly: System.Web (in System.Web.dll)
[ConfigurationPropertyAttribute("verbs")] [TypeConverterAttribute(typeof(CommaDelimitedStringCollectionConverter))] public StringCollection Verbs { get; }
Property Value
Type: System.Collections.Specialized.StringCollectionA StringCollection collection containing the verbs whose authorization must be verified.
The Verbs property is a comma-separated list of HTTP transmission methods that are granted or denied access to the resource.
The following code example shows how to access this property.
// 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);
.NET Framework
Available since 2.0
Available since 2.0
Show: