System.Web.HttpRequestValidationException: A potentially dangerous Request.F
ASP.NET .0验证请求 System.Web.HttpRequestValidationException: A potentially dangerous Request.F
System.Web.HttpRequestValidationException: A potentially dangerous Request.F 在使用类似eWebedtior 拷贝内容进去的时候会带入 <> 在保存的时候会失败
解决方法如下: 当页面输入框默认情况下输入“<”或者“>”的时候。按照访问策略,这将导致一些安全问题,诸如:跨站脚本攻击(cross-site scripting attack)。而这个问题的更准确描述则是,当你在安装了.NET Framework 4.0以上版本后,当你的应用程序以.NET Framework 4.0为框架版本,你的任意服务器请求,都将被进行服务器请求验证(ValidationRequest),这不仅包括ASP.NET,同时也包括Web Services等各种HTTP请求,不仅仅针对aspx页面,也针对HTTP Handler,HTTP Module等,因为这个验证(Valify)的过程,将会发生在BeginRequest事件之前。 基于以上原理,在ASP.NET之前的版本中,请求验证也是默认开通的,但是发生在页面级(aspx)的,并且只在请求执行的时候生效,因此,在旧的版本中,我们只需要按以下方式配置即可:
在页面级别(aspx中)设置
ValidateRequest="false"
或者
在全局级别(Web.config中)设置
<configuration>
<system.web>
<pages validateRequest="false">
但是,以上设置仅对ASP.NET4.0以上有效。在ASP.NET4.0版本上,我们需要更多一行的配置:
在全局级别(Web.config中)设置
<configuration>
<system.web>
<httpRuntime requestValidationMode="2.0">
System.Web.HttpRequestValidationException: A potentially dangerous Request.F的更多相关文章
- ASP.NET 4.0验证请求 System.Web.HttpRequestValidationException: A potentially dangerous Request.F
System.Web.HttpRequestValidationException: A potentially dangerous Request.F 在使用类似eWebedtior 拷贝内容进去的 ...
- System.Web.HttpRequestValidationException: 从客户端(dbFlag="<soap:Envelope xmlns...")中检测到有潜在危险的 Request.Form 值。
System.Web.HttpRequestValidationException: 从客户端(dbFlag="<soap:Envelope xmlns...")中检测到有潜 ...
- WebServcies 调用方法异常:System.Web.HttpRequestValidationException: 从客户端中检测到有潜在危险的 Request.Form 值。
我在做WebServcies时,页面调试,报类了下面这样的错误信息: System.Web.HttpRequestValidationException: 从客户端(checkXML="&l ...
- ASP.NET 4.0 potentially dangerous Request.Form value was detected
A few days ago, while working on an ASP.NET 4.0 Web project, I got an issue. The issue was, when use ...
- [BILL WEI] A potentially dangerous Request.Path value was detected from the client 异常处理办法
我们在ASP.net中使用URL导向后, 我们在访问某个地址,或者打开某个系统页面的时候,就会报错误: A potentially dangerous Request.Path value was d ...
- A potentially dangerous Request.Form value was detected from the client问题处理
问题剖析: 用户在页面上提交表单到服务器时,服务器会检测到一些潜在的输入风险,例如使用富文本编辑器控件(RichTextBox.FreeTextBox.CuteEditor等)编辑的内容中包含有HTM ...
- A potentially dangerous Request.Path value was detected from the client异常解决方案
场景: 当URL中存在“<,>,*,%,&,:,/”特殊字符时,页面会抛出A potentially dangerous Request.Path value was detect ...
- System.Web.HttpRequestValidationException——从客户端检测到危险的Request值
这是比较常见的问题了,如果Web表单中有输入类似于Html标签之类的文本,在通过Request.QueryString或者Request.Form传递这些值的时候,就会触发这样的异常,出于脚本注入等安 ...
- System.Web.HttpRequestValidationException: 从客户端(name="<a href=''>我是晓菜鸟</a>")中检测到有潜在危险的 Request.Form 值
这是一个比较常见的问题了,如果Web表单中有输入类似于 Html 标签之类的文本,在通过 Request.QueryString 或者 Request.Form 传递这些值的时候,就会触发这样的异常, ...
随机推荐
- 阿里云yum源安装
1.先清理掉yum.repos.d下面的所有repo文件 [root@localhost yum.repos.d]# rm -rf * 2.下载repo文件 wget http://mirror ...
- python教程与资料
网上有个人写的python快速教程,非常好.比看书好多了.猛击下面的链接地址 http://www.douban.com/group/topic/30008503/ python文档资料收集 pyth ...
- TortoiseSvn的安装过程详解
运行TortoiseSVN-1.6.6.17493-win32-svn-1.6.6.msi程序, 开始安装 点击Next, 下一步 选择 I accept 接受, 点击Next, 下一步 选择安装路径 ...
- LZ77.py
import math from bitarray import bitarray class LZ77Compressor: """ A simplified impl ...
- js变量问题
this指向问题,谁调用它,它就指谁!!! 1.var foo = 1; function bar() { foo = 10; return; function foo() {} } bar(); a ...
- [LeetCode] Find K Pairs with Smallest Sums 找和最小的K对数字
You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define ...
- [LeetCode] Binary Tree Postorder Traversal 二叉树的后序遍历
Given a binary tree, return the postorder traversal of its nodes' values. For example: Given binary ...
- [LeetCode] Jump Game 跳跃游戏
Given an array of non-negative integers, you are initially positioned at the first index of the arra ...
- 在html中添加script脚本的方法和注意事项
在html中添加script脚本有两种方法,直接将javascript代码添加到html中与添加外部js文件,这两种方法都比较常用,大家可以根据自己需要自由选择 在html中添加<script& ...
- Docket学习--Docker入门
什么是Docker? Docker是一个开源的引擎,可以轻松的为任何应用创建一个轻量级的.可移植的.自给自足的容器.开发者在笔记本上编译测试通过的容器可以批量地在生产环境中部署,包括VMs(虚拟机). ...