HttpServerUtilityWrapper 類別

定義

封裝 HTTP 內建物件,這個物件提供協助程式方法以處理 Web 要求。Encapsulates the HTTP intrinsic object that provides helper methods for processing Web requests.

public ref class HttpServerUtilityWrapper : System::Web::HttpServerUtilityBase
public class HttpServerUtilityWrapper : System.Web.HttpServerUtilityBase
type HttpServerUtilityWrapper = class
    inherit HttpServerUtilityBase
Public Class HttpServerUtilityWrapper
Inherits HttpServerUtilityBase
繼承
HttpServerUtilityWrapper

備註

HttpServerUtilityWrapper類別衍生自 HttpServerUtilityBase 類別,並作為類別的包裝函式 HttpServerUtilityThe HttpServerUtilityWrapper class derives from the HttpServerUtilityBase class and serves as a wrapper for the HttpServerUtility class. 這個類別會公開類別的功能, HttpServerUtility 同時也會公開 HttpServerUtilityBase 型別。This class exposes the functionality of the HttpServerUtility class while also exposing the HttpServerUtilityBase type. HttpServerUtilityBase類別可讓您 HttpServerUtility 在應用程式中使用自訂的實作為來取代類別的原始實作為,例如,當您在 ASP.NET 管線外部執行單元測試時。The HttpServerUtilityBase class enables you to replace the original implementation of the HttpServerUtility class in your application with a custom implementation, such as when you perform unit testing outside the ASP.NET pipeline.

建構函式

HttpServerUtilityWrapper(HttpServerUtility)

初始化 HttpServerUtilityWrapper 類別的新執行個體。Initializes a new instance of the HttpServerUtilityWrapper class.

屬性

MachineName

取得伺服器的電腦名稱。Gets the server's computer name.

ScriptTimeout

取得或設定要求的逾時值 (以秒為單位)。Gets or sets the request time-out value in seconds.

方法

ClearError()

清除最近的例外狀況。Clears the most recent exception.

CreateObject(String)

建立物件程式設計識別碼 (ProgID) 所識別之 COM 物件的伺服器執行個體。Creates a server instance of a COM object that is identified by the object's programmatic identifier (ProgID).

CreateObject(Type)

建立以物件類型識別之 COM 物件的伺服器執行個體。Creates a server instance of a COM object that is identified by the object's type.

CreateObjectFromClsid(String)

建立以物件類別識別項 (CLSID) 所識別之 COM 物件的伺服器執行個體。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 集合的值。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)

在目前處理序的內容中,執行指定虛擬路徑的處理常式。Executes the handler for the specified virtual path in the context of the current process.

Execute(String, Boolean)

在目前處理序的內容中,執行指定虛擬路徑的處理常式,並指定是否清除 QueryStringForm 集合。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 執行個體從執行的處理常式中擷取輸出。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 集合的值。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()

傳回最近的例外狀況。Returns the most recent exception.

GetType()

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

(繼承來源 Object)
HtmlDecode(String)

將 HTML 編碼字串解碼,並傳回解碼的字串。Decodes an HTML-encoded string and returns the decoded string.

HtmlDecode(String, TextWriter)

將 HTML 編碼字串解碼,並在資料流中傳回結果。Decodes an HTML-encoded string and returns the results in a stream.

HtmlEncode(String)

將字串作 HTML 編碼,並傳回編碼的字串。HTML-encodes a string and returns the encoded string.

HtmlEncode(String, TextWriter)

將字串進行 HTML 編碼,並將產生的輸出傳送至輸出資料流。HTML-encodes a string and sends the resulting output to an output stream.

MapPath(String)

傳回對應於 Web 伺服器上所指定虛擬路徑的實體檔案路徑。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 集合的值,結束執行目前的處理序並開始執行新要求。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 指定的頁面或處理常式。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 集合。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 的結束點。Asynchronously executes the end point at the specified URL.

TransferRequest(String, Boolean)

以非同步方式執行指定 URL 的端點,並指定是否要清除 QueryStringForm 集合。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 執行端點。Asynchronously executes the endpoint at the specified URL by using the specified HTTP method and headers.

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

使用指定的 HTTP 方法、標頭、路徑,以及保留表單值和保留使用者識別的選項,執行所指定 URL 的非同步執行。Performs an asynchronous execution of the specified URL using the specified HTTP method, headers, path, and options to preserve form values and preserve the user identity.

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.

(繼承來源 HttpServerUtilityBase)
UrlDecode(String)

將 URL 編碼字串解碼,並傳回解碼的字串。Decodes a URL-encoded string and returns the decoded string.

UrlDecode(String, TextWriter)

解碼 URL 編碼的字串,並將結果輸出傳送至資料流。Decodes a URL-encoded string and sends the resulting output to a stream.

UrlEncode(String)

將字串作 URL 編碼,並傳回編碼的字串。URL-encodes a string and returns the encoded string.

UrlEncode(String, TextWriter)

將字串作 URL 編碼,並送出結果輸出至資料流。URL-encodes a string and sends the resulting output to a stream.

UrlPathEncode(String)

將 URL 字串的路徑部分進行 URL 編碼。URL-encodes the path section of a URL string.

UrlTokenDecode(String)

使用 base64 數字,將 URL 字串語彙基元解碼成其對應的位元組陣列。Decodes a URL string token into an equivalent byte array by using base64 digits.

UrlTokenEncode(Byte[])

使用 base64 數字,將位元組陣列編碼成對等的字串表示,使其可在 URL 上傳輸。Encodes a byte array into an equivalent string representation by using base64 digits, which makes it usable for transmission on the URL.

適用於