HttpHandlerAction 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
配置一個 HttpHandlersSection 配置區段。 此類別無法獲得繼承。
public ref class HttpHandlerAction sealed : System::Configuration::ConfigurationElement
public sealed class HttpHandlerAction : System.Configuration.ConfigurationElement
type HttpHandlerAction = class
inherit ConfigurationElement
Public NotInheritable Class HttpHandlerAction
Inherits ConfigurationElement
- 繼承
範例
以下程式碼範例說明如何使用該 HttpModuleAction 型別。
// Get the handlers.
System.Web.Configuration.HttpHandlerActionCollection httpHandlers = httpHandlersSection.Handlers;
'Get the handlers.
Dim httpHandlers As System.Web.Configuration.HttpHandlerActionCollection = httpHandlersSection.Handlers
以下配置摘錄展示了如何以宣告式 httpHandlers 方式指定該區段的值。
<httpHandlers>
<add path="Calculator.custom"
type="Samples.Aspnet.SystemWebConfiguration.Calculator, CalculatorHandler"
verb="GET" validate="false" />
</httpHandlers>
備註
此 HttpHandlerAction 類別提供一種程式化存取與修改 add 設定區段元素 httpHandlers 的方式。
此類型屬於包含 和 HttpHandlerActionCollectionHttpHandlersSection 的群組。
Note
可以 HttpHandlerAction 根據該區段屬性 AllowDefinition (值為 Everywhere)從設定檔的相關區段讀寫資訊。
ASP.NET 先在應用程式的私有 \bin 目錄中搜尋處理器組件 DLL,然後再在系統組裝快取中搜尋。
建構函式
| 名稱 | Description |
|---|---|
| HttpHandlerAction(String, String, String, Boolean) |
利用傳遞的參數初始化類別的新實例 HttpHandlerAction 。 |
| HttpHandlerAction(String, String, String) |
利用傳遞的參數初始化類別的新實例 HttpHandlerAction 。 |