Cấp bậc tác giả:

DOTNET

Lỗi ASP.Net: ASP.Net error A potentially dangerous Request.Form value was detected from the client

Được viết bởi QuangIT ngày 20/09/2012 lúc 03:33 PM
Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted.
  • 0
  • 1476

Lỗi ASP.Net: ASP.Net error A potentially dangerous Request.Form value was detected from the client


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 (FCKeditor1="<img alt="" src="/Ni...").


Stack Trace:



[HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value was detected from the client (FCKeditor1="<img alt="" src="/Ni...").]
   System.Web.HttpRequest.ValidateString(String s, String valueName, String collectionName) +8723434
   System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, String collectionName) +111
   System.Web.HttpRequest.get_Form() +129
   System.Web.HttpRequest.get_HasForm() +8723543
   System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +97
   System.Web.UI.Page.DeterminePostBackMode() +63
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
   System.Web.UI.Page.ProcessRequest() +80
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.thongbaotintuc_aspx.ProcessRequest(HttpContext context) in c:\Users\vandienkh\AppData\Local\Temp\Temporary ASP.NET Files\nienluan\9c742068\cdfc592a\App_Web_-qebxrpc.16.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Để fix lỗi này, ở trang aspx bạn thêm thuộc tính  validateRequest="false". Đây là điều bắt buộc đối với những site ứng dụng sử dụng: FTB hay FCKEditor

Nguồn bài viết: Dngaz.com

BÌNH LUẬN BÀI VIẾT

Bài viết mới nhất

LIKE BOX

Bài viết được xem nhiều nhất

HỌC HTML