HttpRequest.Unvalidated HttpRequest.Unvalidated HttpRequest.Unvalidated HttpRequest.Unvalidated Property

定義

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

public:
 property System::Web::UnvalidatedRequestValues ^ Unvalidated { System::Web::UnvalidatedRequestValues ^ get(); };
public System.Web.UnvalidatedRequestValues Unvalidated { get; }
member this.Unvalidated : System.Web.UnvalidatedRequestValues
Public ReadOnly Property Unvalidated As UnvalidatedRequestValues

屬性值

尚未使用要求驗證檢查的 HTTP 要求值。The HTTP request values that have not been checked using request validation.

備註

要求驗證檢查 HTML 標記和指令碼,可能表示有潛在的跨網站指令碼的攻擊。Request validation checks for HTML markup and script that might indicate a potential cross-site scripting attack. 根據預設,所有的值會檢查使用要求驗證,而且如果任何值會包含標記或指令碼,ASP.NET 會擲回HttpRequestValidationException例外狀況。By default, all values are checked using request validation and if any values contain markup or script, ASP.NET throws an HttpRequestValidationException exception. 使用這個方法,如果您預期的要求將會包含標記 (例如,您允許使用者張貼內容,其中包含標記) 和您想要取得要求的原始值。Use this method if you anticipate that the request will contain markup (for example, you are allowing users to post content that contains markup) and you want to get the raw value of a request.

重要

如果您使用這個屬性時,您必須手動檢查潛在的跨網站指令碼攻擊的資料。If you use this property, you must manually check the data for potential cross-site scripting attacks.

適用於

另請參閱