Using .NET Framework, I get System.Web.HttpRequestValidationException when data contains HTML
Using .NET Framework, I get System.Web.HttpRequestValidationException when data contains HTML
I have spent a full day trying to get around Microsoft's Request Validation - JUST LET ME WRITE THE CODE.
If I Edit a row and any of the fields have HTML in them, Editor.Process gets a HTTPRequestValidationException.
Any help would be really nice. I know I am not the first one to have this issue.
This discussion has been closed.
Answers
Hi,
Have you tried using UnvalidatedRequestValues?
Are you using .NET Framework or .NET Core? What is the exact error message that is returned?
Allan
ASP.Net Framework.
It is not the .Net IHttpActionResult FAQs() function that is failing to run. I can step through it with the debugger and examine the request values and it does not fail until the Datatables Process() is called.
The error is:
System.Web.HttpRequestValidationException: 'A potentially dangerous Request.Form value was detected from the client (data[row_199][englishanswer]="
<
p>A clear view of t...").'
I found it, thanks for your tip. I passed Process(request.Unvalidated)