Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
A potentially dangerous Request.Form value was detected from the client
posted

I'm using WebDataGrid in v15.1.20151.1018. 

When user edit in the WDG and entering something with "<", for example: cost<price, it shows in the grid correctly but when s/he click any button which triggered postback, the page throw an exception:

Exception Type: System.Web.HttpRequestValidationException
Exception Message: A potentially dangerous Request.Form value was detected from the client (ctl00_cphContent_WDG_clientState="...lue":"cost<price","_commited":...").

Exception Source: System.Web
Target Site: ValidateString
Stack Trace:
---- Stack Trace ----
System.Web.HttpRequest.ValidateString(String valueString collectionKey, RequestValidationSource requestCollection)
Unknown file: N 9694221
System.Web.HttpRequest.ValidateHttpValueCollection(HttpValueCollection collectionRequestValidationSource requestCollection)
Unknown file: N 00184
System.Web.HttpRequest.get_Form()
Unknown file: N 00055
System.Web.HttpRequest.get_HasForm()
Unknown file: N 9695791
System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull)
Unknown file: N 00095
System.Web.UI.Page.DeterminePostBackMode()
Unknown file: N 00069
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPointBoolean includeStagesAfterAsyncPoint)
Unknown file: N 06704
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPointBoolean includeStagesAfterAsyncPoint)
Unknown file: N 00245
System.Web.UI.Page.ProcessRequest()
Unknown file: N 00072
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
Unknown file: N 00021
System.Web.UI.Page.ProcessRequest(HttpContext context)
Unknown file: N 00058
ASP.content_testing_aspx.ProcessRequest(HttpContext context)
App_Web_ggc1pwr1.4.cs: line 0000, col 00,IL 0001
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
Unknown file: N 00341
System.Web.HttpApplication.ExecuteStep(IExecutionStep stepBoolean& completedSynchronously)
Unknown file: N 00069

For some security reason we are not allowed to set ValidateRequest to false.

Why WDG isn't post the Encoded string to backend but the original symbol?

Any suggestion or workaround could apply to pass this exception?

Thanks a lot.