Using .NET Framework, I get System.Web.HttpRequestValidationException when data contains HTML

Using .NET Framework, I get System.Web.HttpRequestValidationException when data contains HTML

SeanDevoySeanDevoy Posts: 13Questions: 4Answers: 1

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.

Answers

  • allanallan Posts: 61,723Questions: 1Answers: 10,108 Site admin

    Hi,

    Have you tried using UnvalidatedRequestValues?

    Are you using .NET Framework or .NET Core? What is the exact error message that is returned?

    Allan

  • SeanDevoySeanDevoy Posts: 13Questions: 4Answers: 1

    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...").'

  • SeanDevoySeanDevoy Posts: 13Questions: 4Answers: 1

    I found it, thanks for your tip. I passed Process(request.Unvalidated)

This discussion has been closed.