asp.net-mvc – requestValidationMode =“2.0”实际上是做什么的?

我试图解决一个“潜在的危险Request.Form值被从客户端检测到”的问题,而SO答案和 Scott Hanselman推荐设置
<httpRuntime requestValidationMode="2.0" />

在Web.config中(以及向有问题的方法添加一个属性)。
我意识到这会将验证模式更改为ASP.NET 2.0,但这是什么意思?
而且,这种改变是否有任何副作用?

谢谢。

解决方法

查看 MSDN’s HttpRuntimeSection.RequestValidationMode Property的描述。

2.0. Request validation is enabled only for pages,not for all HTTP requests. In addition,the request validation settings of the pages element (if any) in the configuration file or of the @ Page directive in an individual page are used to determine which page requests to validate.

相关文章

这篇文章主要讲解了“WPF如何实现带筛选功能的DataGrid”,文...
本篇内容介绍了“基于WPF如何实现3D画廊动画效果”的有关知识...
Some samples are below for ASP.Net web form controls:(fr...
问题描述: 对于未定义为 System.String 的列,唯一有效的值...
最近用到了CalendarExtender,结果不知道为什么发生了错位,...
ASP.NET 2.0 page lifecyle ASP.NET 2.0 event sequence cha...