HttpHandlersSection クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
Web アプリケーションの HTTP ハンドラーを構成します。 このクラスは継承できません。
public ref class HttpHandlersSection sealed : System::Configuration::ConfigurationSection
public sealed class HttpHandlersSection : System.Configuration.ConfigurationSection
type HttpHandlersSection = class
inherit ConfigurationSection
Public NotInheritable Class HttpHandlersSection
Inherits ConfigurationSection
- 継承
例
次のコード例は、 HttpHandlersSection クラスを使用して、既存の Web アプリケーションの httpHandlers セクションにアクセスする方法を示しています。
// Get the Web application configuration.
System.Configuration.Configuration configuration = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("/aspnetTest");
// Get the section.
System.Web.Configuration.HttpHandlersSection httpHandlersSection = (System.Web.Configuration.HttpHandlersSection) configuration.GetSection("system.web/httphandlers");
' Get the Web application configuration.
Dim configuration As System.Configuration.Configuration = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("/aspnetTest")
' Get the section.
Dim httpHandlersSection As System.Web.Configuration.HttpHandlersSection = CType(configuration.GetSection("system.web/httphandlers"), System.Web.Configuration.HttpHandlersSection)
次の構成の抜粋は、 httpHandlers セクションに対して宣言によって値を指定する方法を示しています。
<httpHandlers>
<add path="Calculator.custom"
type="Samples.Aspnet.SystemWebConfiguration.Calculator, CalculatorHandler"
verb="GET" validate="false" />
</httpHandlers>
注釈
HttpHandlersSection クラスは、構成ファイルの httpHandlers セクションにプログラムでアクセスして変更する方法を提供します。 この型は、 HttpHandlerAction と HttpHandlerActionCollection 型を含むグループの一部です。
Note
HttpHandlersSectionは、値がAllowDefinitionされた Everywhere セクション プロパティに従って、構成ファイルの関連セクションとの間で情報の読み取りと書き込みを行うことができます。
コンストラクター
| 名前 | 説明 |
|---|---|
| HttpHandlersSection() |
HttpHandlersSection クラスの新しいインスタンスを初期化します。 |