ProWorks Blog

Disabling Request Validation in Umbraco CMS

By  |  Sunday, November 10, 2013  |   |  1 comment

In a recent upgrade of a very old Umbraco CMS WebForms site to 6.x I found a trick with getting the request validation disabled on a template level instead of for the entire web site through the web.config.

I'm posting this blog because the original blog by Grant Thomas seems to have disappeared.  The blog was referenced on Stack Overflow and luckily its still available as a cache on Google.

Generally, you will recieve an error in the Javascript Console such as:

A potentially dangerous Request.Form value was detected from the client

Unfortunately, there is no way to disable request validation on a page level as pages are virtual things in Umbraco. Luckily, someone thought of this and they created a way to disable validation on a template level.

Add this to the template markup:

<umbraco:DisableRequestValidation runat="server" />

If you need something more custom, then refer to the cache of the blog post for more information.

1 comment for “Disabling Request Validation in Umbraco CMS”

  1. Posted 11/11/2013 at 2:29:58 PM
    Gravatar of Casey Neehouse

    Yes, you can use this control, or you can also load the page as the Default page and set it in code through User Controls or other custom controls that may need it.

    Almost forgot about that gem.

Post a comment

Comments closed