专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > DotNet Exception

System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected f

发布时间:2011-06-26 20:23:41 文章来源:www.iduyao.cn 采编人员:星星草

我让数据库中输入数据时~只要内容喊有html标签~如 <html> , <table> 等等~就报错~
报错内容如下:
Server Error in '/房产网 ' Application.
--------------------------------------------------------------------------------

A potentially dangerous Request.Form value was detected from the client (nr= " <html> ").
Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.

Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (nr= " <html> ").

请问怎么解决?

------解决方法--------------------------------------------------------
<%@ Page language= "c# " Codebehind= "xxx.aspx.cs " AutoEventWireup= "false " Inherits= "xxxx.xxx " validateRequest= "false "%>
或者 webconfig
<pages validateRequest= "false "> </pages>
------解决方法--------------------------------------------------------
<%@ Page language= "c# " Codebehind= "xxx.aspx.cs " AutoEventWireup= "false " Inherits= "xxxx.xxx " validateRequest= "false "%>
或者 webconfig
<pages validateRequest= "false "> </pages>
------解决方法--------------------------------------------------------
在 <%@Page%> 里加validateRequest= "false "

    
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: