Saturday, 23 October 2010

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

You'll get this error from the .Net framework when it detects potentially harmful content in a web request submission. Want to disable this validation? Read on...

For normal ASP.Net Web forms apps you can disable request validation by setting validateRequest=false in the page directive (top of your aspx page) or in the configuration section.

For ASP.Net MVC apps add the [ValidateInput(false)] attribute to the appropriate controller action.

Be careful when turning off this value as you are making your site vulnerable by accepting potentially harmful input. You should explicitly validate your input in your code if you disable the built in .Net request validation.


  1. Hey! thanks for useful review. It was easy to read, but I'd like to add that if your company needs to be updated try outsource software development services.

  2. A lot of thanks for your fresh tips. Casino partners always search for online casino affiliate programs to increase their revenue income from best casinos or poker rooms.

  3. Thank you for sharing with us. Turn your attention on home insurance rates by zip code to save your money on house policy.

  4. Thanks a lot...I was using jQuery to make an ajax call that contained a some html tags that were marked as potentially dangerous...worked great