解决报错:A potentially dangerous Request.Form value was detected from the client
来源:互联网 发布:海尔是国企吗 知乎 编辑:程序博客网 时间:2024/06/07 09:39
用户在页面上提交表单到服务器时,服务器会检测到一些潜在的输入风险,例如使用富文本编辑器控件(RichTextBox、FreeTextBox、CuteEditor等)编辑的内容中包含有HTML标记或脚本标记,ASP.NET页面会抛出一个"A potentially dangerous Request.Form value was deceted from the client"的异常。这个是ASP.NET页面为了防范页面注入功能的一种保护机制,要取消这种保护,常规的做法是在.aspx文件的<%@Page %>部分加入ValidateRequest="false"属性。但是从.NET 4.0开始你可能需要多修改一个地方,在网站的web.config文件中加入这行配置:
<system.web> <compilation debug="true" targetFramework="4.0"/> <httpRuntime requestValidationMode="2.0"/></system.web>
同时,你还需要确保页面上用户输入的部分不会存在任何注入攻击的代码,常用的做法是使用Encode处理。
0 0
- 解决报错:A potentially dangerous Request.Form value was detected from the client
- 解决A potentially dangerous Request.Form value was detected from the client
- 解决ASP.NET 4.0 "A potentially dangerous Request.Form value was detected from the client". 错误
- 错误解决:[A potentially dangerous Request.Form value was detected from the client]
- 错误提示: A potentially dangerous Request.Form value was detected from the client ....
- A potentially dangerous Request.Form value was detected from the client
- A potentially dangerous Request.Form value was detected from the client
- A potentially dangerous Request.Form value was detected from the client
- A potentially dangerous Request.Form value was detected from the client
- A potentially dangerous Request.Form value was detected from the client
- A potentially dangerous Request.Form value was detected from the client (txtTest="").
- A potentially dangerous Request.Form value was detected from the client
- .net 4.0 A potentially dangerous Request.Form value was detected from the client 的解决方案
- A potentially dangerous Request.Form value was detected from the client
- 处理asp.net出现A potentially dangerous Request.Form value was detected from the client
- A potentially dangerous Request.Form value was detected from the client
- A potentially dangerous Request.Form value was detected from the client
- A potentially dangerous Request.Form value was detected from the client
- c#更新语句
- 复习操作系统
- Tomcat配置忽略应用名称的解决方案
- STM32 学习记录(目录)
- 数据结构与算法分析Java版练习1.11和1.12
- 解决报错:A potentially dangerous Request.Form value was detected from the client
- MFC MDI应用程序 自定义标题
- 文件管理NSFileManager
- org.apache.log4j.Logger 详解
- 【Linux】linux下zlib压缩与crc32校验
- OC之成员变量封装
- CloseHandle(),TerminateThread(),ExitThread()的区别
- 打开word时有弹窗的解决方法
- Mysql com.mysql.jdbc.PacketTooBigException 的解决方案