HttpRequest HttpRequest HttpRequest HttpRequest Class

定義

允許 ASP.NET 在 Web 要求期間讀取用戶端送出的 HTTP 值。Enables ASP.NET to read the HTTP values sent by a client during a Web request.

public ref class HttpRequest sealed
public sealed class HttpRequest
type HttpRequest = class
Public NotInheritable Class HttpRequest
繼承
HttpRequestHttpRequestHttpRequestHttpRequest

範例

下列範例會HttpRequest Request使用Page類別的屬性,存取目前要求的實例。The following examples access the HttpRequest instance for the current request by using the Request property of the Page class.

您可以使用簡化的語法來QueryString存取、 FormCookiesServerVariables集合中的資料。You can use simplified syntax for accessing data from the QueryString, Form, Cookies, or ServerVariables collections. 您可以撰寫Request["key"]You can write Request["key"].

第一個範例顯示如何在載入頁面時,抓取查詢字串值。The first example shows how to retrieve a query string value when loading a page.

public partial class AddToCart : Page  
{  
    protected void Page_Load(object sender, EventArgs e)  
    {  
        string rawId = Request["ProductID"];  
        int productId;  
        if (!String.IsNullOrEmpty(rawId) && int.TryParse(rawId, out productId))  
        {  
            using (ShoppingCartActions usersShoppingCart = new ShoppingCartActions())  
            {  
                usersShoppingCart.AddToCart(productId);  
            }  
        }  
        else  
        {  
            throw new Exception("Tried to call AddToCart.aspx without setting a ProductId.");  
        }  
        Response.Redirect("ShoppingCart.aspx");  
    }  
}  
Public Class AddToCart  
    Inherits Page  
  
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load  
        Dim rawId = Request("ProductID")  
        Dim productId As Integer  
        If Not String.IsNullOrEmpty(rawId) And Integer.TryParse(rawId, productId) Then  
            Using usersShoppingCart As New ShoppingCartActions()  
                usersShoppingCart.AddToCart(productId)  
            End Using  
  
        Else  
            Throw New Exception("Tried to call AddToCart.aspx without setting a ProductId.")  
        End If  
        Response.Redirect("ShoppingCart.aspx")  
    End Sub  
End Class  

下一個範例示範如何檢查要求是否經過驗證,並取得原始 URL。The next example shows how to check if the request is authenticated and retrieve the raw URL.

public partial class RestrictedPage : Page  
{  
    protected void Page_Load(object sender, EventArgs e)  
    {  
        if (!Request.IsAuthenticated)  
        {  
            var rawUrl = Request.RawUrl;  
            Response.Redirect("/Account/Login?ru=" + Server.HtmlEncode(rawUrl));  
        }  
    }  
}  
Public Class RestrictedPage  
    Inherits Page  
  
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load  
        If Not Request.IsAuthenticated Then  
            Dim rawUrl = Request.RawUrl  
            Response.Redirect("/Account/Login?ru=" + Server.HtmlEncode(rawUrl))  
        End If  
    End Sub  
End Class  

本主題提供具有原始程式碼的 Visual Studio 網站專案:下載A Visual Studio Web site project with source code is available to accompany this topic: Download.

這個範例會使用StreamWriter類別,將數個HttpRequest類別屬性的值寫入至檔案。This example uses the StreamWriter class to write the values of several HttpRequest class properties to a file. 針對字串類型的屬性,這些值會在寫入檔案時以 HTML 編碼。For properties that are of type string, the values are HTML encoded as they are written to the file. 代表集合的屬性會透過進行迴圈,而它們所包含的每個索引鍵/值組都會寫入至檔案。Properties that represent a collection are looped through, and each key/value pair that they contain is written to the file.

重要

這個範例有一個可接受使用者輸入的文字方塊,這可能會造成安全性威脅。This example has a text box that accepts user input, which is a potential security threat. 根據預設,ASP.NET Web 網頁會驗證使用者輸入未包含指令碼或 HTML 項目。By default, ASP.NET Web pages validate that user input does not include script or HTML elements. 如需詳細資訊,請參閱 Script Exploits Overview (指令碼攻擊概觀)。For more information, see Script Exploits Overview.

<%@ Page Language="C#" %>
<%@ import Namespace="System.Threading" %>
<%@ import Namespace="System.IO" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">

    /* NOTE: To use this sample, create a c:\temp\CS folder,
    *  add the ASP.NET account (in IIS 5.x <machinename>\ASPNET,
    *  in IIS 6.x NETWORK SERVICE), and give it write permissions
    *  to the folder.*/

    private const string INFO_DIR = @"c:\temp\CS\RequestDetails";
    public static int requestCount;

    private void Page_Load(object sender, System.EventArgs e)
    {

        // Create a variable to use when iterating
        // through the UserLanguages property.
        int langCount;

        int requestNumber = Interlocked.Increment(ref requestCount);

        // Create the file to contain information about the request.
        string strFilePath = INFO_DIR + requestNumber.ToString() + @".txt";


        StreamWriter sw = File.CreateText(strFilePath);

        try
        {
// <snippet2>
            // Write request information to the file with HTML encoding.
            sw.WriteLine(Server.HtmlEncode(DateTime.Now.ToString()));
            sw.WriteLine(Server.HtmlEncode(Request.CurrentExecutionFilePath));
            sw.WriteLine(Server.HtmlEncode(Request.ApplicationPath));
            sw.WriteLine(Server.HtmlEncode(Request.FilePath));
            sw.WriteLine(Server.HtmlEncode(Request.Path));
// </snippet2>

// <snippet3>
            // Iterate through the Form collection and write
            // the values to the file with HTML encoding.
            // String[] formArray = Request.Form.AllKeys;
            foreach (string s in Request.Form)
            {
                sw.WriteLine("Form: " + Server.HtmlEncode(s));
            }
// </snippet3>

// <snippet4>
            // Write the PathInfo property value
            // or a string if it is empty.
            if (Request.PathInfo == String.Empty)
            {
                sw.WriteLine("The PathInfo property contains no information.");
            }
            else
            {
                sw.WriteLine(Server.HtmlEncode(Request.PathInfo));
            }
// </snippet4>

// <snippet5>
            // Write request information to the file with HTML encoding.
            sw.WriteLine(Server.HtmlEncode(Request.PhysicalApplicationPath));
            sw.WriteLine(Server.HtmlEncode(Request.PhysicalPath));
            sw.WriteLine(Server.HtmlEncode(Request.RawUrl));
// </snippet5>

// <snippet6>
            // Write a message to the file dependent upon
            // the value of the TotalBytes property.
            if (Request.TotalBytes > 1000)
            {
                sw.WriteLine("The request is 1KB or greater");
            }
            else
            {
                sw.WriteLine("The request is less than 1KB");
            }
// </snippet6>

// <snippet7>
            // Write request information to the file with HTML encoding.
            sw.WriteLine(Server.HtmlEncode(Request.RequestType));
            sw.WriteLine(Server.HtmlEncode(Request.UserHostAddress));
            sw.WriteLine(Server.HtmlEncode(Request.UserHostName));
            sw.WriteLine(Server.HtmlEncode(Request.HttpMethod));
// </snippet7>

// <snippet8>
            // Iterate through the UserLanguages collection and
            // write its HTML encoded values to the file.
            for (langCount=0; langCount < Request.UserLanguages.Length; langCount++)
            {
                sw.WriteLine(@"User Language " + langCount +": " + Server.HtmlEncode(Request.UserLanguages[langCount]));
            }
// </snippet8>
       }

       finally
       {
            // Close the stream to the file.
            sw.Close();
       }

        lblInfoSent.Text = "Information about this request has been sent to a file.";
    }


    private void btnSendInfo_Click(object sender, System.EventArgs e)
    {
        lblInfoSent.Text = "Hello, " + Server.HtmlEncode(txtBoxName.Text) +
          ". You have created a new  request info file.";
    }

</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
        <p>
        </p>
        <p>
            Enter your name here:
            <asp:TextBox id="txtBoxName" runat="server"></asp:TextBox>
        </p>
        <p>
            <asp:Button id="btnSendInfo" onclick="btnSendInfo_Click" runat="server" Text="Click Here"></asp:Button>
        </p>
        <p>
            <asp:Label id="lblInfoSent" runat="server"></asp:Label>
        </p>
    </form>
</body>
</html>
<%@ Page Language="VB" %>
<%@ import Namespace="System.Threading" %>
<%@ import Namespace="System.IO" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">

    '  NOTE: To use this sample, create a c:\temp\CS folder,
    '  add the ASP.NET account (in IIS 5.x <machinename>\ASPNET,
    '  in IIS 6.x NETWORK SERVICE), and give it write permissions
    '  to the folder.

    Private Const INFO_DIR As String = "c:\temp\VB\RequestDetails"
    Public Shared requestCount As Integer

    Private Sub Page_Load(sender As Object, e As System.EventArgs)

        ' Create a variable to use when iterating
        ' through the UserLanguages property.
        Dim langCount As Integer

        ' Create a counter to name the file.
        Dim requestNumber As Integer = _
          Interlocked.Increment(requestCount)

        ' Create the file to contain information about the request.
        Dim strFilePath As String = INFO_DIR & requestNumber.ToString() & ".txt"
        Dim sw As StreamWriter = File.CreateText(strFilePath)

        Try

' <snippet2>
            ' Write request information to the file with HTML encoding.
            sw.WriteLine(Server.HtmlEncode(DateTime.Now.ToString()))
            sw.WriteLine(Server.HtmlEncode(Request.CurrentExecutionFilePath))
            sw.WriteLine(Server.HtmlEncode(Request.ApplicationPath))
            sw.WriteLine(Server.HtmlEncode(Request.FilePath))
            sw.WriteLine(Server.HtmlEncode(Request.Path))
' </snippet2>

' <snippet3>
            ' Iterate through the Form collection and write
            ' the values to the file with HTML encoding.
            For Each s As String In Request.Form
                sw.WriteLine("Form: " & Server.HtmlEncode(s))
            Next s
' </snippet3>

' <snippet4>
            ' Write the PathInfo property value
            ' or a string if it is empty.
            If Request.PathInfo = String.Empty Then
                sw.WriteLine("The PathInfo property contains no information.")
            Else
                sw.WriteLine(Server.HtmlEncode(Request.PathInfo))
            End If
' </snippet4>

' <snippet5>
            ' Write request information to the file with HTML encoding.
            sw.WriteLine(Server.HtmlEncode(Request.PhysicalApplicationPath))
            sw.WriteLine(Server.HtmlEncode(Request.PhysicalPath))
            sw.WriteLine(Server.HtmlEncode(Request.RawUrl))
' </snippet5>

' <snippet6>
            ' Write a message to the file dependent upon
            ' the value of the TotalBytes property.
            If Request.TotalBytes > 1000 Then
                sw.WriteLine("The request is 1KB or greater")
            Else
                sw.WriteLine("The request is less than 1KB")
            End If
' </snippet6>

' <snippet7>
            ' Write request information to the file with HTML encoding.
            sw.WriteLine(Server.HtmlEncode(Request.RequestType))
            sw.WriteLine(Server.HtmlEncode(Request.UserHostAddress))
            sw.WriteLine(Server.HtmlEncode(Request.UserHostName))
            sw.WriteLine(Server.HtmlEncode(Request.HttpMethod))
' </snippet7>

' <snippet8>
            ' Iterate through the UserLanguages collection and
            ' write its HTML encoded values to the file.
            For langCount = 0 To Request.UserLanguages.Length - 1
                sw.WriteLine("User Language " & langCount.ToString() & _
                 ": " & Server.HtmlEncode( _
                     Request.UserLanguages(langCount)))
            Next
' </snippet8>

        Finally
            ' Close the stream to the file.
            sw.Close()
        End Try

        lblInfoSent.Text = _
         "Information about this request has been sent to a file."
    End Sub 'Page_Load



    Private Sub btnSendInfo_Click(sender As Object, e As System.EventArgs)
        lblInfoSent.Text = _
         "Hello, " & Server.HtmlEncode(txtBoxName.Text) & _
          ". You have created a new  request info file."
    End Sub 'btnSendInfo_Click

</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
        <p>
        </p>
        <p>
            Enter your name here:
            <asp:TextBox id="txtBoxName" runat="server"></asp:TextBox>
        </p>
        <p>
            <asp:Button id="btnSendInfo" onclick="btnSendInfo_Click" runat="server" Text="Click Here"></asp:Button>
        </p>
        <p>
            <asp:Label id="lblInfoSent" runat="server"></asp:Label>
        </p>
    </form>
</body>
</html>

備註

HttpRequest類別的方法和屬性會Request透過HttpApplicationHttpContextPageUserControl類別的屬性來公開。The methods and properties of the HttpRequest class are exposed through the Request properties of the HttpApplication, HttpContext, Page, and UserControl classes.

QueryString若要存取、 FormCookies QueryStringServerVariables集合中的資料,您可以撰寫Request["key"],如屬性的範例所示。To access data from the QueryString, Form, Cookies, or ServerVariables collections, you can write Request["key"], as shown in the example for the QueryString property.

注意

類別成員的HttpRequest Unicode 支援需要 IIS 6.0 版或更新版本。Unicode support for HttpRequest class members requires IIS version 6.0 or later.

建構函式

HttpRequest(String, String, String) HttpRequest(String, String, String) HttpRequest(String, String, String) HttpRequest(String, String, String)

初始化 HttpRequest 物件。Initializes an HttpRequest object.

屬性

AcceptTypes AcceptTypes AcceptTypes AcceptTypes

取得用戶端支援的 MIME 接受 (Accept) 類型的字串陣列。Gets a string array of client-supported MIME accept types.

AnonymousID AnonymousID AnonymousID AnonymousID

取得使用者的匿名識別項 (如果有)。Gets the anonymous identifier for the user, if present.

ApplicationPath ApplicationPath ApplicationPath ApplicationPath

取得 ASP.NET 應用程式在伺服器上的虛擬應用程式根路徑。Gets the ASP.NET application's virtual application root path on the server.

AppRelativeCurrentExecutionFilePath AppRelativeCurrentExecutionFilePath AppRelativeCurrentExecutionFilePath AppRelativeCurrentExecutionFilePath

取得應用程式根目錄的虛擬路徑,並對應用程式根目錄使用波狀符號 (~) 標記法,讓此路徑變成相對路徑 (就像是 "~/page.aspx")。Gets the virtual path of the application root and makes it relative by using the tilde (~) notation for the application root (as in "~/page.aspx").

Browser Browser Browser Browser

取得或設定關於要求的用戶端瀏覽器功能的資訊。Gets or sets information about the requesting client's browser capabilities.

ClientCertificate ClientCertificate ClientCertificate ClientCertificate

取得目前要求的用戶端安全憑證。Gets the current request's client security certificate.

ContentEncoding ContentEncoding ContentEncoding ContentEncoding

取得實體 (Entity) 主體的字元集 (Character Set)。Gets or sets the character set of the entity-body.

ContentLength ContentLength ContentLength ContentLength

指定用戶端送出的內容長度,以位元組為單位。Specifies the length, in bytes, of content sent by the client.

ContentType ContentType ContentType ContentType

取得或設定連入要求的 MIME 內容類型。Gets or sets the MIME content type of the incoming request.

Cookies Cookies Cookies Cookies

取得用戶端送出的 Cookie 的集合。Gets a collection of cookies sent by the client.

CurrentExecutionFilePath CurrentExecutionFilePath CurrentExecutionFilePath CurrentExecutionFilePath

取得目前要求的虛擬路徑。Gets the virtual path of the current request.

CurrentExecutionFilePathExtension CurrentExecutionFilePathExtension CurrentExecutionFilePathExtension CurrentExecutionFilePathExtension

取得 CurrentExecutionFilePath 屬性中指定之檔案名稱的副檔名。Gets the extension of the file name that is specified in the CurrentExecutionFilePath property.

FilePath FilePath FilePath FilePath

取得目前要求的虛擬路徑。Gets the virtual path of the current request.

Files Files Files Files

取得用戶端所上傳的檔案集合,其格式為多重 MIME。Gets the collection of files uploaded by the client, in multipart MIME format.

Filter Filter Filter Filter

在讀取目前輸入資料流時取得或設定要使用的篩選條件。Gets or sets the filter to use when reading the current input stream.

Form Form Form Form

取得表單變數的集合。Gets a collection of form variables.

Headers Headers Headers Headers

取得 HTTP 標頭的集合。Gets a collection of HTTP headers.

HttpChannelBinding HttpChannelBinding HttpChannelBinding HttpChannelBinding

取得目前 ChannelBinding 執行個體的 HttpWorkerRequest 物件。Gets the ChannelBinding object of the current HttpWorkerRequest instance.

HttpMethod HttpMethod HttpMethod HttpMethod

取得用戶端使用的 HTTP 資料傳輸方法 (例如 GETPOSTHEAD)。Gets the HTTP data transfer method (such as GET, POST, or HEAD) used by the client.

InputStream InputStream InputStream InputStream

取得連入 HTTP 實體主體的內容。Gets the contents of the incoming HTTP entity body.

IsAuthenticated IsAuthenticated IsAuthenticated IsAuthenticated

取得值,表示要求是否已經驗證過。Gets a value indicating whether the request has been authenticated.

IsLocal IsLocal IsLocal IsLocal

取得值,表示要求是否來自本機電腦。Gets a value indicating whether the request is from the local computer.

IsSecureConnection IsSecureConnection IsSecureConnection IsSecureConnection

取得值,這個執會指示 HTTP 連接是否使用安全通訊 (也就是,HTTPS)。Gets a value indicating whether the HTTP connection uses secure sockets (that is, HTTPS).

Item[String] Item[String] Item[String] Item[String]

QueryStringFormCookiesServerVariables 集合取得指定的物件。Gets the specified object from the QueryString, Form, Cookies, or ServerVariables collections.

LogonUserIdentity LogonUserIdentity LogonUserIdentity LogonUserIdentity

取得目前使用者的 WindowsIdentity 型別。Gets the WindowsIdentity type for the current user.

Params Params Params Params

取得 QueryStringFormCookiesServerVariables 項目的組合集合。Gets a combined collection of QueryString, Form, Cookies, and ServerVariables items.

Path Path Path Path

取得目前要求的虛擬路徑。Gets the virtual path of the current request.

PathInfo PathInfo PathInfo PathInfo

取得具有 URL 副檔名之資源的其他路徑資訊。Gets the additional path information for a resource with a URL extension.

PhysicalApplicationPath PhysicalApplicationPath PhysicalApplicationPath PhysicalApplicationPath

取得目前正在執行的伺服器應用程式的根目錄之實體檔案系統路徑。Gets the physical file system path of the currently executing server application's root directory.

PhysicalPath PhysicalPath PhysicalPath PhysicalPath

取得對應到要求的 URL 之實體檔案系統路徑。Gets the physical file system path corresponding to the requested URL.

QueryString QueryString QueryString QueryString

取得 HTTP 查詢字串變數的集合。Gets the collection of HTTP query string variables.

RawUrl RawUrl RawUrl RawUrl

取得目前要求的原始 URL。Gets the raw URL of the current request.

ReadEntityBodyMode ReadEntityBodyMode ReadEntityBodyMode ReadEntityBodyMode

取得值,指出是否已讀取要求實體主體,而且如果是的話,如何讀取。Gets a value that indicates whether the request entity body has been read, and if so, how it was read.

RequestContext RequestContext RequestContext RequestContext

取得目前要求的 RequestContext 執行個體。Gets the RequestContext instance of the current request.

RequestType RequestType RequestType RequestType

取得或設定用戶端使用的 HTTP 資料傳輸方法 (GETPOST)。Gets or sets the HTTP data transfer method (GET or POST) used by the client.

ServerVariables ServerVariables ServerVariables ServerVariables

取得 Web 伺服器變數的集合。Gets a collection of Web server variables.

TimedOutToken TimedOutToken TimedOutToken TimedOutToken

取得要求逾時已過時觸動的 CancellationToken 物件。Gets a CancellationToken object that is tripped when a request times out.

TlsTokenBindingInfo TlsTokenBindingInfo TlsTokenBindingInfo TlsTokenBindingInfo

取得 TLS 權杖繫結資訊。Gets the TLS token binding information. 此屬性可讓應用程從內送 HTTP 要求擷取權杖資訊,以執行增強式驗證。The property enables applications to retrieve token information from incoming HTTP requests for enhanced authentication.

TotalBytes TotalBytes TotalBytes TotalBytes

取得目前輸入資料流的位元組數目。Gets the number of bytes in the current input stream.

Unvalidated Unvalidated Unvalidated Unvalidated

取得 HTTP 要求值,而不觸發要求驗證。Gets the HTTP request values without triggering request validation.

Url Url Url Url

取得關於目前要求的 URL 資訊。Gets information about the URL of the current request.

UrlReferrer UrlReferrer UrlReferrer UrlReferrer

取得有關用戶端的先前要求之 URL (連結至目前 URL) 的資訊。Gets information about the URL of the client's previous request that linked to the current URL.

UserAgent UserAgent UserAgent UserAgent

取得已提供的用戶端瀏覽器原始使用者代理程式字串。Gets the raw user agent string of the client browser that has been provided. 請注意,它可以是 null。Please note it may be null.

UserHostAddress UserHostAddress UserHostAddress UserHostAddress

取得遠端用戶端的 IP 主機位址。Gets the IP host address of the remote client.

UserHostName UserHostName UserHostName UserHostName

取得遠端用戶端的 DNS 名稱。Gets the DNS name of the remote client.

UserLanguages UserLanguages UserLanguages UserLanguages

取得用戶端語言喜好設定的已排序的字串陣列。Gets a sorted string array of client language preferences.

方法

Abort() Abort() Abort() Abort()

強制終止造成任何待處理 I/O 失敗的基礎 TCP 連線。Forcibly terminates the underlying TCP connection, causing any outstanding I/O to fail. 您可以使用此方法,以回應惡意 HTTP 用戶端攻擊。You might use this method in response to an attack by a malicious HTTP client.

BinaryRead(Int32) BinaryRead(Int32) BinaryRead(Int32) BinaryRead(Int32)

在目前輸入資料流執行指定位元組數的二進位讀取。Performs a binary read of a specified number of bytes from the current input stream.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from Object)
GetBufferedInputStream() GetBufferedInputStream() GetBufferedInputStream() GetBufferedInputStream()

取得可用來讀取連入 HTTP 實體本文的 Stream 物件。Gets a Stream object that can be used to read the incoming HTTP entity body.

GetBufferlessInputStream() GetBufferlessInputStream() GetBufferlessInputStream() GetBufferlessInputStream()

取得可用來讀取連入 HTTP 實體本文的 Stream 物件。Gets a Stream object that can be used to read the incoming HTTP entity body.

GetBufferlessInputStream(Boolean) GetBufferlessInputStream(Boolean) GetBufferlessInputStream(Boolean) GetBufferlessInputStream(Boolean)

取得 Stream 物件,其可用於讀取連入 HTTP 實體本文,並選擇性地停用 MaxRequestLength 屬性中所設定的要求長度限制。Gets a Stream object that can be used to read the incoming HTTP entity body, optionally disabling the request-length limit that is set in the MaxRequestLength property.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

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

(Inherited from Object)
GetType() GetType() GetType() GetType()

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

(Inherited from Object)
InsertEntityBody() InsertEntityBody() InsertEntityBody() InsertEntityBody()

將 HTTP 要求實體本文的複本提供給 IIS。Provides IIS with a copy of the HTTP request entity body.

InsertEntityBody(Byte[], Int32, Int32) InsertEntityBody(Byte[], Int32, Int32) InsertEntityBody(Byte[], Int32, Int32) InsertEntityBody(Byte[], Int32, Int32)

將 HTTP 要求實體本文的複本及該要求實體物件的相關資訊提供給 IIS。Provides IIS with a copy of the HTTP request entity body and with information about the request entity object.

MapImageCoordinates(String) MapImageCoordinates(String) MapImageCoordinates(String) MapImageCoordinates(String)

將收到的影像欄的表單參數對應至適當的 X 座標和 Y 座標值。Maps an incoming image-field form parameter to appropriate x-coordinate and y-coordinate values.

MapPath(String) MapPath(String) MapPath(String) MapPath(String)

將指定的虛擬路徑對應至實體路徑。Maps the specified virtual path to a physical path.

MapPath(String, String, Boolean) MapPath(String, String, Boolean) MapPath(String, String, Boolean) MapPath(String, String, Boolean)

將指定的虛擬路徑對應至實體路徑。Maps the specified virtual path to a physical path.

MapRawImageCoordinates(String) MapRawImageCoordinates(String) MapRawImageCoordinates(String) MapRawImageCoordinates(String)

將收到的影像欄的表單參數對應至適當的 X 和 Y 座標值。Maps an incoming image field form parameter into appropriate x and y coordinate values.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
SaveAs(String, Boolean) SaveAs(String, Boolean) SaveAs(String, Boolean) SaveAs(String, Boolean)

將 HTTP 要求儲存至磁碟。Saves an HTTP request to disk.

ToString() ToString() ToString() ToString()

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

(Inherited from Object)
ValidateInput() ValidateInput() ValidateInput() ValidateInput()

會對透過 CookiesFormQueryString 屬性存取的集合進行驗證。Causes validation to occur for the collections accessed through the Cookies, Form, and QueryString properties.

適用於