现在的位置: 首页 > 综合 > 正文

ValidateRequest=false 无效(.Net 4.0 )

2013年02月17日 ⁄ 综合 ⁄ 共 246字 ⁄ 字号 评论关闭
当我们投递数据到Asp.net页面时有以下异常:
异常:从客户端(code)中检测到有潜在危险的Request.Form 值
并且设置在页面或web.config设置了
ValidateRequest="false"
均无效时,需要用下面的代码:
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0"/>
    <httpRuntime  requestValidationMode="2.0" />

抱歉!评论已关闭.