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


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

この例では、httpModules セクション内の add 要素の属性に対して、宣言によって値を指定する方法を示しています。これらの属性には、HttpModulesSection クラスのメンバとしてもアクセスできます。
次の構成ファイルの例では、httpModules 要素 (ASP.NET 設定スキーマ) セクションに対して、宣言によって値を指定する方法を示しています。
<httpModules> <add name="TimerModule" type="Samples.Aspnet.Configuration.RequestTimeInterval, RequestTimeInterval Version=1.0.1557.23158, Culture=neutral, PublicKeyToken=7bfb33146a87b52e, processorArchitecture=MSIL"/> </httpModules>
HttpModulesSection クラスを使用する方法を次のコード例に示します。
HTTP モジュールの構築と構成の方法を示す完全な例については、「方法 : HTTP モジュールを作成および構成する」を参照してください。
' Get the Web application configuration. Dim configuration As System.Configuration.Configuration = WebConfigurationManager.OpenWebConfiguration("/aspnetTest") ' Get the HttpModulesSection. Dim httpModulesSection As HttpModulesSection = CType(configuration.GetSection("system.web/httpModules"), HttpModulesSection)
// Get the Web application configuration. Configuration configuration = WebConfigurationManager.OpenWebConfiguration("/aspnetTest"); // Get the HttpModulesSection. HttpModulesSection httpModulesSection = (HttpModulesSection) configuration.GetSection("system.web/httpModules");

System.Configuration.ConfigurationElement
System.Configuration.ConfigurationSection
System.Web.Configuration.HttpModulesSection


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


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