A potentially dangerous Request.Form value was detected from the client
2017-04-25 14:32
405 查看
错误解决:A potentially dangerous Request.Form value was detected from the client
在网站后台插入数据,返回下面的错误:系统检测到有潜在危险的 Request.Form 值。A potentially dangerous Request.Form value was detected from the client (txtTest="<b>").
这个是因为requestValidationMode是asp.net提供的,用于防止cross-site scripting (XSS)攻击!默认就是开启的!
.net 4之前,它只在aspx文件及类文件被调用的时候,才会起作用!
.net 4之后,它会对所有的http请求起作用,即使用了ValidateRequest=False
要解决验证错误,只能继续使用.net 2.0的请求验证功能:
即在web.config文件中的<system.web>标签中加入下面的代码。
<httpRuntime requestValidationMode="2.0"/>
相关文章推荐
- 处理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(txtTest="<b>").
- 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
- 解决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 (txtTest="").
- 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
- discuz 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 (warning="卡Ć.