日期:2014-05-18  浏览次数:20410 次

提交数据时出现System.Web.HttpRequestValidationException (0x80004005):错误
在对一个表单数据操作保存提交时出现System.Web.HttpRequestValidationException (0x80004005):错误。

具体错误信息是:
System.Web.HttpRequestValidationException (0x80004005): 从客户端(HtmlPhrasing="首页 >...")中检测到有潜在危险的 Request.Form 值。 在 System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection) 在 System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, RequestValidationSource requestCollection) 在 System.Web.HttpRequest.get_Form() 在 System.Web.HttpRequest.get_HasForm() 在 System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) 在 System.Web.UI.Page.DeterminePostBackMode() 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 在 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 在 System.Web.UI.Page.ProcessRequest() 在 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) 在 System.Web.UI.Page.ProcessRequest(HttpContext context) 在 ASP.manage_news_class_add_aspx.ProcessRequest(HttpContext context) 位置 c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\82cd880e\690de11d\App_Web_mhvxj4gp.0.cs:行号 0 在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 在

------解决方案--------------------
修改web.config文件:

XML code
<configuration> 
<system.web> 
    <pages validateRequest="false" /> 
</system.web> 
</configuration>

------解决方案--------------------
探讨

引用:
修改web.config文件:


XML code
<configuration>
<system.web>
<pages validateRequest="false" />
</system.web>
</configuration>



或者在页面加上。。、
<%@ Page ValidateRequest="fals……

------解决方案--------------------
webconfig 中添加
<system.web>
 <httpRuntime requestValidationMode="2.0" />
</system.web>
------解决方案--------------------
一般情况下,按照1楼的就可以解决了
但是不排除地址中会少写个双引号的情况