当前位置: 首页 > 工具软件 > webEditor > 使用案例 >

Error:A potentially dangerous Request.Form value was detected from the (WebEditor1="...bsp;&nbsp;<B>

东门楚
2023-12-01

在asp.net中使用web编辑器提交表单时,出现如下错误:

Error:A potentially dangerous Request.Form value was detected from the (WebEditor1="...bsp;&nbsp;<B>

当遇到此问题时解决办法如下:

1、在相应的网页添加声明 ValidateRequest="False",比较安全

<%@ Page ValidateRequest="False"  Language="C#" 

2、修改web.config

<system.web>
    <httpRuntime maxRequestLength="1048576" requestValidationMode="2.0" executionTimeout="60" appRequestQueueLimit="100"/>

  <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" validateRequest="false " >

</system.web>


 类似资料: