AuthorizationRule.Action プロパティ
アセンブリ: System.Web (system.web.dll 内)
構文Dim instance As AuthorizationRule Dim value As AuthorizationRuleAction value = instance.Action instance.Action = value
public: property AuthorizationRuleAction Action { AuthorizationRuleAction get (); void set (AuthorizationRuleAction value); }
/** @property */ public AuthorizationRuleAction get_Action () /** @property */ public void set_Action (AuthorizationRuleAction value)
public function get Action () : AuthorizationRuleAction public function set Action (value : AuthorizationRuleAction)
AuthorizationRuleAction 値の 1 つ。
解説実行時、承認モジュールは、特定のユーザーに適合する最初のアクセス規則が見つかるまで、allow 要素と deny 要素を反復処理します。最初に見つかったアクセス規則が allow か deny であるかによって、URL リソースへのアクセスを許可または拒否します。既定では、アクセスは許可されます。
使用例' 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);
プラットフォームWindows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照AuthorizationRuleAction 列挙体
アセンブリ: System.Web (system.web.dll 内)
構文Public Enumeration AuthorizationRuleAction
メンバ
解説
使用例Action プロパティを使用する方法を次のコード例に示します。このコード例は、AuthorizationRule クラスのトピックで取り上げているコード例の一部分です。
プラットフォームWindows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照- AuthorizationRuleActionのページへのリンク