HttpServerUtilityBase 類別

定義

作為提供 Helper 方法以處理 Web 要求之類別的基底類別。Serves as the base class for classes that provide helper methods for processing Web requests.

public ref class HttpServerUtilityBase abstract
public abstract class HttpServerUtilityBase
type HttpServerUtilityBase = class
Public MustInherit Class HttpServerUtilityBase
繼承
HttpServerUtilityBase
衍生

備註

HttpServerUtilityBase類別是抽象類別,其包含與類別相同的成員 HttpServerUtilityThe HttpServerUtilityBase class is an abstract class that contains the same members as the HttpServerUtility class. HttpServerUtilityBase類別可讓您建立類似類別的衍生類別 HttpServerUtility ,但您可以自訂和在 ASP.NET 管線之外工作。The HttpServerUtilityBase class enables you to create derived classes that are like the HttpServerUtility class, but that you can customize and that work outside the ASP.NET pipeline. 當您執行單元測試時,您通常會使用衍生類別來執行自訂行為的成員,以滿足您正在測試的案例。When you perform unit testing, you typically use a derived class to implement members with customized behavior that fulfills the scenario you are testing.

HttpServerUtilityWrapper 類別衍生自 HttpServerUtilityBase 類別。The HttpServerUtilityWrapper class derives from the HttpServerUtilityBase class. 類別可做為類別的包裝函式 HttpServerUtilityWrapper HttpServerUtilityThe HttpServerUtilityWrapper class serves as a wrapper for the HttpServerUtility class. 在執行時間,您通常會使用類別的實例 HttpServerUtilityWrapper 來呼叫物件的成員 HttpServerUtilityAt run time, you typically use an instance of the HttpServerUtilityWrapper class to call members of the HttpServerUtility object.

建構函式

HttpServerUtilityBase()

初始化這個類別,以供繼承的類別執行個體使用。Initializes the class for use by an inherited class instance. 這個建構函式只能由繼承的類別呼叫。This constructor can only be called by an inherited class.

屬性

MachineName

在衍生類別中覆寫時,取得伺服器的電腦名稱。When overridden in a derived class, gets the server's computer name.

ScriptTimeout

在衍生類別中覆寫時,取得或設定要求的逾時值 (以秒為單位)。When overridden in a derived class, gets or sets the request time-out value in seconds.

方法

ClearError()

在衍生類別中覆寫時,清除最新的例外狀況。When overridden in a derived class, clears the most recent exception.

CreateObject(String)

在衍生類別中覆寫時,建立以物件的程式設計識別碼 (ProgID) 識別之 COM 物件的伺服器執行個體。When overridden in a derived class, creates a server instance of a COM object that is identified by the object's programmatic identifier (ProgID).

CreateObject(Type)

在衍生類別中覆寫時,建立以物件類型識別之 COM 物件的伺服器執行個體。When overridden in a derived class, creates a server instance of a COM object that is identified by the object's type.

CreateObjectFromClsid(String)

在衍生類別中覆寫時,建立以物件類別識別項 (CLSID) 識別之 COM 物件的伺服器執行個體。When overridden in a derived class, creates a server instance of a COM object that is identified by the object's class identifier (CLSID).

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
Execute(IHttpHandler, TextWriter, Boolean)

在衍生類別中覆寫時,執行目前處理序內容中的指定處理常式,並使用 TextWriter 執行個體從執行的處理常式擷取輸出,以及指定是否清除 QueryStringForm 集合的值。When overridden in a derived class, executes the specified handler in the context of the current process, using a TextWriter instance to capture output from the executed handler and a value that specifies whether to clear the QueryString and Form collections.

Execute(String)

在衍生類別中覆寫時,於目前處理序的內容中,執行所指定虛擬路徑的處理常式。When overridden in a derived class, executes the handler for the specified virtual path in the context of the current process.

Execute(String, Boolean)

在衍生類別中被覆寫時,在目前處理序的內容中,執行指定虛擬路徑的處理常式,並指定是否清除 QueryStringForm 集合。When overridden in a derived class, executes the handler for the specified virtual path in the context of the current process and specifies whether to clear the QueryString and Form collections.

Execute(String, TextWriter)

在衍生類別中覆寫時,在目前處理序的內容中,執行指定虛擬路徑的處理常式,並使用 TextWriter 執行個體從執行的處理常式中擷取輸出。When overridden in a derived class, executes the handler for the specified virtual path in the context of the current process, using a TextWriter instance to capture output from the executed handler.

Execute(String, TextWriter, Boolean)

在衍生類別中覆寫時,執行目前要求內容中指定虛擬路徑的處理常式,並使用 TextWriter 執行個體從此頁面擷取輸出,以及指定是否清除 QueryStringForm 集合的值。When overridden in a derived class, executes the handler for the specified virtual path in the context of the current request, using a TextWriter instance to capture output from the page and a value that indicates whether to clear the QueryString and Form collections.

GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetLastError()

在衍生類別中覆寫時,傳回最新的例外狀況。When overridden in a derived class, returns the most recent exception.

GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
HtmlDecode(String)

在衍生類別中覆寫時,將經過 HTML 編碼的字串進行解碼,並傳回解碼的字串。When overridden in a derived class, decodes an HTML-encoded string and returns the decoded string.

HtmlDecode(String, TextWriter)

在衍生類別中覆寫時,將經過 HTML 編碼的字串進行解碼,並以資料流形式傳回結果。When overridden in a derived class, decodes an HTML-encoded string and returns the results in a stream.

HtmlEncode(String)

在衍生類別中覆寫時,將字串進行 HTML 編碼,並傳回編碼字串。When overridden in a derived class, HTML-encodes a string and returns the encoded string.

HtmlEncode(String, TextWriter)

在衍生類別中覆寫時,以 HTML 編碼字串,並將產生的輸出傳送至輸出資料流。When overridden in a derived class, HTML-encodes a string and sends the resulting output to an output stream.

MapPath(String)

在衍生的類別中覆寫時,傳回對應到 Web 伺服器上所指定虛擬路徑的實體檔案路徑。When overridden in a derived class, returns the physical file path that corresponds to the specified virtual path on the Web server.

MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)
Transfer(IHttpHandler, Boolean)

在衍生類別中覆寫時,使用自訂 HTTP 處理常式,以及指定是否要清除 QueryStringForm 集合的值,結束執行目前的處理序並開始執行新要求。When overridden in a derived class, terminates execution of the current process and starts execution of a new request, using a custom HTTP handler and a value that specifies whether to clear the QueryString and Form collections.

Transfer(String)

在衍生類別中覆寫時,會終止執行目前的處理序,並開始執行以 URL 指定的頁面或處理常式。When overridden in a derived class, terminates execution of the current process and starts execution of a page or handler that is specified with a URL.

Transfer(String, Boolean)

在衍生類別中覆寫時,結束目前網頁的執行,並開始執行不同的頁面或處理常式,方法是使用指定的 URL 和值,其指定是否要清除 QueryStringForm 集合。When overridden in a derived class, terminates execution of the current page and starts execution of a different page or handler by using the specified URL and a value that specifies whether to clear the QueryString and Form collections.

TransferRequest(String)

在衍生類別中覆寫時,以非同步方式執行位於指定 URL 的結束點。When overridden in a derived class, asynchronously executes the end point at the specified URL.

TransferRequest(String, Boolean)

在衍生類別中覆寫時,於指定 URL 以非同步方式執行端點,並指定是否要清除 QueryStringForm 集合。When overridden in a derived class, asynchronously executes the endpoint at the specified URL and specifies whether to clear the QueryString and Form collections.

TransferRequest(String, Boolean, String, NameValueCollection)

在衍生類別中覆寫時,使用指定的 HTTP 方法和標頭,以非同步方式在指定的 URL 執行端點。When overridden in a derived class, asynchronously executes the endpoint at the specified URL by using the specified HTTP method and headers.

TransferRequest(String, Boolean, String, NameValueCollection, Boolean)

在衍生類別中實作時,使用指定的 HTTP 方法、標頭、路徑,以及保留表單值和保留使用者識別的選項,以非同步方式執行位於指定的 URL 上的結束點。When implemented in a derived class, asynchronously executes the end point at the specified URL, using the specified HTTP method, headers, path, and options to preserve form values and preserve the user identity.

UrlDecode(String)

在衍生類別中覆寫時,將經過 URL 編碼的字串進行解碼,並傳回解碼的字串。When overridden in a derived class, decodes a URL-encoded string and returns the decoded string.

UrlDecode(String, TextWriter)

在衍生類別中覆寫時,將 URL 編碼字串解碼,並將產生的輸出傳送至資料流。When overridden in a derived class, decodes a URL-encoded string and sends the resulting output to a stream.

UrlEncode(String)

在衍生類別中覆寫時,將字串進行 URL 編碼,並傳回編碼字串。When overridden in a derived class, URL-encodes a string and returns the encoded string.

UrlEncode(String, TextWriter)

在衍生類別中覆寫時,以 URL 編碼字串,並將產生的輸出傳送至資料流。When overridden in a derived class, URL-encodes a string and sends the resulting output to a stream.

UrlPathEncode(String)

在衍生類別中覆寫時,對 URL 字串的路徑區段進行 URL 編碼。When overridden in a derived class, URL-encodes the path section of a URL string.

UrlTokenDecode(String)

在衍生類別中受到覆寫時,使用 base64 編碼的數字將 URL 字串語彙基元解碼成對應的位元組陣列。When overridden in a derived class, decodes a URL string token into an equivalent byte array by using base64-encoded digits.

UrlTokenEncode(Byte[])

在衍生類別中覆寫時,使用 base64 數字,將位元組陣列編碼成對等的字串表示,使其可在 URL 上傳輸。When overridden in a derived class, encodes a byte array into an equivalent string representation by using base64 digits, which makes it usable for transmission on the URL.

適用於