Requestvalidationmode = "2.0" validaterequest = "false" in web.config does not work

I'm looking for a little help, since now it drives me crazy.

I have a tinyMCE text editor on my page that is filled with content that is already stored in the database as html.

eg. <p>first paragraph</p> <p>second paragraph</p> etc, etc without any problems there.

but when I make changes in the editor and then try to update the contents in the database, I get an error potentially dangerous request.form value was found at the client

I made all the recommended changes to the web.config file

  • requestvalidationmode = "2.0"
  • ValidateRequest = "false"

But still getting the potentially dangerous value of request.form was detected using a client error . This happens in .NET 4.0, any help / advice would be great.

+8
source share
4 answers

I would not even try to include this at the site level in the web.config file - just do it on the page if you know for sure that the input is safe:

<%@ Page ... ValidateRequest="false" %>

You can use the Umbraco control provided specifically for this purpose from the template:

<umbraco:DisableRequestValidation runat="server" />
+5
source

You must publish the web.config section,

Must be

<system.web>
    <compilation debug="true" targetFramework="4.0" />
    <httpRuntime requestValidationMode="2.0" />
</system.web>
+5
source

Add this line to your file web.config.

  <pages  validateRequest="false"></pages>
0
source

All Articles