HttpModulesSection クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
Web アプリケーションの HTTP モジュールを構成します。 このクラスは継承できません。
public ref class HttpModulesSection sealed : System::Configuration::ConfigurationSection
public sealed class HttpModulesSection : System.Configuration.ConfigurationSection
type HttpModulesSection = class
inherit ConfigurationSection
Public NotInheritable Class HttpModulesSection
Inherits ConfigurationSection
- 継承
例
この例では、 セクション内の要素の属性に対して宣言的に値をadd
httpModules
指定する方法を示します。これは、 クラスの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 を示します。
// Get the Web application configuration.
Configuration configuration = WebConfigurationManager.OpenWebConfiguration("/aspnetTest");
// Get the HttpModulesSection.
HttpModulesSection httpModulesSection = (HttpModulesSection) configuration.GetSection("system.web/httpModules");
' 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)
注釈
HttpModulesSection クラスを使用すると、構成ファイルの httpModules
セクションにプログラムからアクセスして変更できます。
この型は、 型と 型を含む HttpModuleAction グループの HttpModuleActionCollection 一部です。
注意
はHttpModulesSection、値Everywhereが である section プロパティAllowDefinitionに従って、構成ファイルの関連セクションとの間で情報の読み取りと書き込みを行うことができます。
コンストラクター
HttpModulesSection() |
HttpModulesSection クラスの新しいインスタンスを初期化します。 |