A potentially dangerous Request.Form value was detected from the client

来源:互联网 发布:移动通信网络结构图 编辑:程序博客网 时间:2024/05/16 10:10

解决方法:

页面中设置ValidateRequest="false",asp.net 4.0需要在web.config文件中配置如下结点

<configuration>
    <system.web>
        <httpRuntimerequestValidationMode="2.0">

如果是asp.net mvc

需要在对应的Controller Action上增加[ValidateInput(false)]特性


转载自:http://apps.hi.baidu.com/share/detail/21178272

原创粉丝点击