A potentially dangerous Request.Form value was detected from the client
    文章作者:恒爱云[恒爱网络] 阅读次数:6606 发布时间:2012-5-16
    某客户安装 Spacebuilder v3.2 后 ,一切正常,网站唯独发布信息时提示 “A potentially dangerous Request.Form value was detected from the client”。

    这是由于内容中包含html标签造成的。

    要怎么解决这个问题? 看到网上有如下处理方式:

    错误提示本身有解决方法参考链接:http://go.microsoft.com/fwlink/?LinkId=153133

    按照这个链接所提示的方法,有时并不能很好的解决。更好的解决方法是:

    在web.config中添加如下属性



    <httpRuntime requestValidationMode="2.0" />

    </system.web>

    据说这个方法比较安全一点。

    于是查找
    <httpRuntime enable="true" executionTimeout="300" maxRequestLength="102400" requestLengthDiskThreshold="512" enableVersionHeader="false" />

    再其后面分别添加修改为 :

    <httpRuntime enable="true" executionTimeout="300" maxRequestLength="102400" requestLengthDiskThreshold="512" enableVersionHeader="false" requestValidationMode="2.0" />

    问题成功解决!