
500
|
Chapter 23: The System.Web Namespace
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
Returned By
HttpApplication.Request, HttpContext.Request, System.Web.UI.Page.Request, System.Web.
UI.UserControl.Request
Passed To
System.Web.Configuration.HttpCapabilitiesBase.GetConfigCapabilities( ), HttpContext.
HttpContext( ), System.Web.Services.Protocols.MimeParameterReader.Read( ), System.Web.
UI.MobileControls.Adapters.HtmlPageAdapter.DeterminePostBackMode( ), System.Web.UI.
MobileControls.Adapters.WmlPageAdapter.DeterminePostBackMode( ), System.Web.UI.
MobileControls.IPageAdapter.DeterminePostBackMode( )
HttpRequestValidationException
System.Web (system.web.dll)
.NET 1.1
sealed class
ASP.NET 1.1 adds a request validation feature designed to prevent some types of
script injection attacks. If request validation is enabled (the default), ASP.NET will
check all posted values, cookies, and the query string for potentially dangerous input.
One example of potentially dangerous input is if the user enters a JavaScript block into
a textbox. This becomes a problem if your code attempts to display the textbox
content by writing it to a web page without first encoding it using the HttpServerUtility.
HtmlEncode( ) method. In this case, your page will not just display the textbox contents--
instead, it will execute the script block. With request validation, ...