AuthorizationSection クラス
アセンブリ: System.Web (system.web.dll 内)


AuthorizationSection クラスを使用すると、構成ファイルの authorization セクションにプログラムからアクセスして変更できます。
この型は、AuthorizationRule 型、AuthorizationRuleCollection 型、AuthorizationRuleAction 型を含むグループの一部です。
![]() |
---|
AuthorizationSection は、値が Everywhere のセクション プロパティ AllowDefinition に従って、構成ファイルの関連するセクションから情報を読み取ったり、このセクションに情報を書き込んだりできます。
|

既存の Web アプリケーションの構成ファイルから AuthorizationSection オブジェクトを取得する方法を次のコード例に示します。このオブジェクトを使用して、メンバにアクセスできます。構成ファイルには、次のようなセットアップが格納されます。
![]() |
---|
credentials セクションを使用する場合は、「ASP.NET の認証」に説明されているガイドラインに従う必要があります。スケーラビリティとセキュリティ機能を高めるため、外部のデータベースを使用して、ユーザーの資格情報を保管することをお勧めします。安全な ASP.NET アプリケーションを構築する方法の詳細については、Microsoft MSDN Web サイト (msdn.microsoft.com) で、「Securing Your ASP.NET Application」や「Building Secure ASP.NET Applications: Authentication, Authorization, and Secure Communication」を参照してください。 |
<authorization> <allow users="userName" roles="admin" verbs="post" /> <deny users="*" verbs="post"/> </authorization>
' Get the Web application configuration. Dim configuration As System.Configuration.Configuration = _ WebConfigurationManager.OpenWebConfiguration( _ "/aspnetTest")
// Get the Web application configuration. System.Configuration.Configuration configuration = WebConfigurationManager.OpenWebConfiguration( "/aspnetTest");

System.Configuration.ConfigurationElement
System.Configuration.ConfigurationSection
System.Web.Configuration.AuthorizationSection


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からAuthorizationSection クラスを検索する場合は、下記のリンクをクリックしてください。

- AuthorizationSection クラスのページへのリンク