I was merrily converting a site from .NET 2.0 to .NET 4.0 when…
Yes, I did say I was upgrading from 2.0 to 4.0.
Anyways, when I did this and used a page that allowed HTML elements to be entered in a TextBox, I got the oh-so helpful error “A potentially dangerous Request.Form value was detected…”
No problem, I would just add the ‘ValidateRequest=”false” ‘ tag at the top of the page and get back to business. But business was not happening, because I added the tag, and nothing happened. Luckily, a little browsing found the solution, which was editing the web.config file and adding the requestValidationMode:
<system.web> <httpRuntime requestValidationMode="2.0"/> </system.web>
That did the trick.