find a location for property in a new city

Wednesday, 14 April 2010

Potentially dangerous request .NET4 upgrade

I encountered an error after upgrading to ASP.NET 4 from 3.5 whereby my page was throwing an HttpRequestValidationException error. With error message "A potentially dangerous Request.Form value was detected from the client". This problem DID NOT occur before on this page that uses a TinyMCE rich text editor.

This page is sending dangerous requests since it is using a rich text editor that post HTML. This was worked around before by putting ValidateRequest="false" in the page declaration.

This seems to be ignored now in .NET4! Really I should be changing TinyMCE to be posting BBCode and replacing it with proper HTML on the server... but... I'm not since this is only for trusted internal users... and I can't be bothered ;)


requestValidationMode="2.0" needs to be added to the httpRuntime element of the <system.web> section of the web.config.

Follow britishdev on Twitter


  1. That what I was looking for.
    Thx dude !

  2. Cheers mate. Makes it all worth while.

  3. This is my first visit to this site and I am very happy to read your blog post. Awesome blog entry. This is outright enchantment from you! I have never observed a more magnificent post than this one. You've truly filled my heart with joy today with this. I trust you keep this up. I have bookmarked this site. Such Beautiful astonishing site continue posting. I will be related with this blog. Much obliged to you. If you are in search of writing related tips visit site Write my Essay, you can get better writing help from here.

  4. Faisalabad is one of the biggest cities in Pakistan and the hub of the textile industry. It is widely acknowledged as the Manchester of Pakistan due to its large industrial role. The quality of the fabrics produced in this city has no parallel. In fact, the fabric is something of a specialty of Faisalabad. Many people from all over the country flock to this city for a spot of cloth shopping. We aim to provide you all of the best of Faisalabad at our store. pakistani designer lawn , pakistani designer lawn