[ASP.net]关于dangerous Request.Form value的解决
2004-10-15 08:24
295 查看
错误提示:
A potentially dangerous Request.Form value was detected from the client
(txtTest="<b>").
由于在.net中,Request时出现有HTML或Javascript等字符串时,系统会认为是危
险性值。立马报错。
解决方案一:
在.aspx文件头中加入这句:
<%@ Page validateRequest="false" %>
解决方案二:
修改web.config文件:
<configuration>
<system.web>
<pages validateRequest="false" />
</system.web>
</configuration>
因为validateRequest默认值为true。只要设为false即可。
A potentially dangerous Request.Form value was detected from the client
(txtTest="<b>").
由于在.net中,Request时出现有HTML或Javascript等字符串时,系统会认为是危
险性值。立马报错。
解决方案一:
在.aspx文件头中加入这句:
<%@ Page validateRequest="false" %>
解决方案二:
修改web.config文件:
<configuration>
<system.web>
<pages validateRequest="false" />
</system.web>
</configuration>
因为validateRequest默认值为true。只要设为false即可。
相关文章推荐
- 解决ASP.NET 4.0 "A potentially dangerous Request.Form value was detected from the client". 错误
- 自己留存:小经验在asp.net 4.5或者asp.net mvc 5解决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
- 解决ASP.NET的“A potentially dangerous Request... value was detected”
- 处理asp.net出现A potentially dangerous Request.Form value was detected from the client
- asp.net 4.0 A potentially dangerous Request.Form value was detected fr
- asp.net 4.0 A potentially dangerous Request.Form value was detected fr(转载)
- ASP.NET 4.0 potentially dangerous Request.Form value was detected
- asp.net 4.0 A potentially dangerous Request.Form value was detected
- 解决ASP.NET MVC 检测到有潜在危险的 Request.Form 值
- ASP.NET从客户端中检测到有潜在危险的request.form值的3种解决方法
- asp.net c# request.QueryString.Form遇到中文乱码的解决方法,可用
- 解决ASP.NET MVC 检测到有潜在危险的 Request.Form 值
- asp整合到asp.net当中,当asp中form提交后,request中文名为乱码的解决方法
- 解决ASP.NET MVC 检测到有潜在危险的 Request.Form 值
- asp.net mvc 从客户端中检测到有潜在危险的 Request.Form 值的解决方法
- 解决报错:A potentially dangerous Request.Form value was detected from the client
- ASP.NET MVC(Razor)上运用UEditor和xhEditor编辑器检测到有潜在危险的 Request.Form的真正解决办法
- asp.net 从客户端中检测到有潜在危险的 Request.Form 值 - 解决办法
- 使用Asp.net MVC 2.0 +.NET 4.0 出现 “从客户端 ... 中检测到有潜在危险的 Request.Form 值”错误的解决办法