Disabling Request Validation in Umbraco CMS

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.

Author

Jason Prothero

comments powered by Disqus
back to top