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 一部です。
注意
はHttpHandlersSection、値Everywhereが である section プロパティに従って、構成ファイルの関連セクションとの間で情報のAllowDefinition読み取りと書き込みを行うことができます。
コンストラクター
HttpHandlersSection() |
HttpHandlersSection クラスの新しいインスタンスを初期化します。 |