首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

怎么捕获这个错误,显示友好提示A potentially dangerous Request.Path value was detected from the

2013-04-02 
如何捕获这个异常,显示友好提示A potentially dangerous Request.Path value was detected from the这个是

如何捕获这个异常,显示友好提示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) 学习

热点排行