读书人

怎么捕获这个错误显示友好提示A pot

发布时间: 2013-04-02 12:35:26 作者: rapoo

如何捕获这个异常,显示友好提示A potentially dangerous Request.Path value was detected from the
这个是.net4.0用来防止畸形URL攻击的功能,当使用恶意畸形URL访问时候,就会出现程序错误提示,我想保留这个功能,但是想显示出自己设计的友好提示页面,而不是系统错误页面,要在哪个位置捕获这个异常呢?环境是4.0 webform,谢谢!!


Exception information:
Exception type: HttpException
Exception message: A potentially dangerous Request.Path value was detected from the client (&).
at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
at System.Web.HttpApplication.ValidateRequestExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 学习

读书人网 >asp.net

热点推荐