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

Jason leads the team at ProWorks Corporation, an Umbraco Platinum Partner specializing in complex Umbraco CMS builds, integrations, support, and upgrades. With 17+ years of Umbraco experience and an Umbraco MVP, he has led dozens of successful projects from versions as old as Umbraco 4 to the latest Long-Term Supported (LTS) releases. Jason is also leading the charge at ProWorks around AI and how to responsibly integrate AI into Umbraco and websites to create ROI and not simply as a novelty.

comments powered by Disqus
back to top