我试图解决一个“潜在的危险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.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。