Request.ValidateInput函数的确切位置

时间:2009-11-19 16:40:29

标签: asp.net

这是Request.ValidateInput函数在ProcessRequest阶段调用的确切位置..? (在asp.net 2.0中)

1 个答案:

答案 0 :(得分:0)

RequestValidation在生命周期的早期就会触发。

这些事件&方法触发,然后在DeterminePostBackMode点终止请求。

  • ExecuteStep
  • 执行
  • BeginProcessRequest
  • ProcessRequestInternal
  • ProcessRequestWithNoAssert
  • 的ProcessRequest
  • ProcessRequestMain
  • DeterminePostBackMode

这是来自HttprequestValidationException的示例堆栈跟踪。

at System.Web.HttpRequest.ValidateString(String s, String valueName, String collectionName) 
at System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, String collectionName) 
at System.Web.HttpRequest.get_Form() 
at System.Web.HttpRequest.get_HasForm() 
at System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) 
at System.Web.UI.Page.DeterminePostBackMode() 
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
at System.Web.UI.Page.ProcessRequest() 
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) 
at System.Web.UI.Page.ProcessRequest(HttpContext context) 
at ASP.register_aspx.ProcessRequest(HttpContext context) in d:\Temporary ASP.NET Files\belfast\09a30891\d8a3024a\App_Web_fxdlie1w.16.cs:line 0 
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 

谢谢,

菲尔。