A potentially dangerous Request.Path value was detected from the client 异常
来源:互联网 发布:java程序员的自我介绍 编辑:程序博客网 时间:2024/05/01 03:50
我们在ASP.net 4.0 中使用URL导向后, 我们在访问类似如下的地址时 http://wz.csdn.net/yanjinde77/一个面试题!********/,就会报错误:
A potentially dangerous Request.Path value was detected from the client
at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
at System.Web.HttpApplication.ValidateRequestExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
这是因为上述地址中有*这个特殊字符存在。
如果你想不让ASP.net 替你拦截这些特殊字符,你需要设置如下Web.config的节:
<?xml version="1.0"?><configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <system.web> <httpRuntime requestPathInvalidCharacters="" /> </system.web></configuration>注意其中的requestPathInvalidCharacters 它是一个以逗号分隔的无效字符列表。不设置它时,它默认的无效字符集(以,分割)是后面7个:<,>,*,%,&,:,/
即,不设置这个属性,默认就是如下设置:
<?xml version="1.0"?><configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <system.web> <httpRuntime requestPathInvalidCharacters="<,>,*,%,:,&,/" /> </system.web></configuration>如果你想这些字符全部不受限制,就应该设置 requestPathInvalidCharacters="" , 如果是部分字符受限制,部分字符不受限制,就需要在 requestPathInvalidCharacters 中设置需要受限制的字符,不受限制的不用设置。
转载:http://blog.csdn.net/ghj1976/archive/2010/06/29/5701277.aspx
- A potentially dangerous Request.Path value was detected from the client 异常
- A potentially dangerous Request.Path value was detected from the client 异常
- A potentially dangerous Request.Path value was detected from the client 异常
- A potentially dangerous Request.Path value was detected from the client 异常
- A potentially dangerous Request.Path value was detected from the client 异常
- A potentially dangerous Request.Path 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.QueryString 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
- 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
- 闲来无事,对链表做了一下整理...
- 海量数据Top K算法(C实现)
- AnimationBlender - Ogre实现不同动画之间的混合
- oracle 9i 安装时报错----areasquerie
- 从此落户CSDN...
- A potentially dangerous Request.Path value was detected from the client 异常
- 简述Android触摸屏手势识别
- objective-c set
- Android 几个特别注意的小知识
- 无奈
- 学习笔记之继承与派生
- 智能指针
- 一个简单的iBatis入门例子
- android 隐藏ListView滚动条