Search  Search  

How to fix error ‘A potentially dangerous Request.Form…’ – even when ‘ValidateRequest’ set to false.
  More Windows ... on Twitter on YouTube on flickr on Pinterest on Facebook on Google+ on Tumblr on LinkedIn

Free wallpapers of the hottest girls of the 2014 Winter Olympics

Complete guide for Euro 2012’, about 300 hundred pages filled with comprehensive information about Euro 2012

Euro 12 - teams, managers, players, fixtures, referees, the brand new ‘Tango 12’ Adidas ball and much, much more. Few hundreds amazing photos.

E-books, free e-books, Euro 2012 e-books

Auckland events in photos at

1 500 photos of fun-run 'Ports of Auckland Round the Bays 2012' at

Ocean swim - more than 1 500 photos of State King of the Bays Forums forums Forums - articles, news, links Forums - articles, news, links 

Photos of State King of the Bays event at

‘Complete guide for Euro 2012’: Given profile all 368 footballers with their photos.

‘Complete guide for Euro 2012’: Read about star players of each squad. Find out who is the key player of each team. What Pele expects of Euro 2012?

‘Complete guide for Euro 2012’: Compare annual salary of coaches participating in the Euro-2012 - and how it happened that the team of the most paid coach finished the last in their group?

‘Complete guide for Euro 2012’: Euro 2012 footballers: who are the most expensive players? Who are the Rising stars at Euro 2012?

E-books, free e-books, Euro 2012 e-books
 Rating: 3.5      Rate this article   34 
 08 Jun 2014

How to fix error ‘A potentially dangerous Request.Form…’ – even when ‘ValidateRequest’ set to false.


How to fix error ‘A potentially dangerous Request.Form…’

ASP.NET provides default protection against cross-site scripting (XSS) attacks by the request validation feature. It checks the data being sent to the server. For example, if someone entered into text box HTML tags instead of a plain text, such entry generates error: ‘A potentially dangerous Request.Form value was detected from the client…’. So this entry simply will not let to the web server.

But sometimes you need the entry as HTML formatted data instead of the plain text – for example when you use Content Management System for your web site and want to write some formatted content.

For such purposes in all versions of .NET Framework (till v. 4.0) it was possible to set at web page directive ValidateRequest to false – this disabled request validation for that page. Sample:
<%@ Page Language="C#" ValidateRequest="false" AutoEventWireup="true" …

But now since version .NET Framework 4.0 even setting ValidateRequest="false" still generates error ‘A potentially dangerous Request.Form…’.

And Microsoft articles don’t explain that from now it is necessary to add such setting to web.config file:


So this setting in web.config file and ValidateRequest="false" in a web page will fix the error.

How to fix error ‘A potentially dangerous Request.Form…’

So to add such setting to web.config file

So to add such setting to web.config file

  More similar links:

How to test string for an Integer?

Pointers Basics

How to hide  (disable)  ControlBox?

How to fix error ‘A potentially dangerous Request.Form…’ – even when ‘ValidateRequest’ set to false.

Hardware Requirements for Microsoft Visual Studio 2010

How to test Credit Cards validity in C#. Sample code.

How to test string for a number?

 Rate this article from 1 to 5 

        Add comment
Your name:
Your comment:
 Tags: SoftFern Tutorials, SoftFern Programming Tutorials, potentially dangerous Request.Form, error potentially dangerous Request, ValidateRequest=false, error even if ValidateRequest=false, to fix error even if ValidateReques, requestValidationMode=”2.0?
   More Windows ...

  Home page Weird We sell Programming Windows
  News Our Photos Photoshop and Photography SQL server Microsoft Office
  Tech News Our Portfolio iPad Misc Web sites development
  Videos Archive Androids Graphic design Software development
  Auckland and New Zealand About Us Tablet PCs CD/DVD presentation Play games online
  Football Contact us Round the Bays 2012 photos Ocean Swim 2012 photos Auckland Events
  Sport Our Portfolio Stock Images Stock Photos Links Exchange
  Hot Girls Our clients On Twitter Add link Site Map
  Our Twitters’ gadget Site Map Google+ Site Grid
  Health and Beauty Site Grid Pinterest Natalia Soft Fern forums
  Misc News Web pages Facebook Photos, images Hair & Beauty
  On YouTube CD/DVD presentaton Tumblr Daily Motion Flickr
  YouTube - 2 Graphics LinkedIn Live Journal Stumble Upon
  Vimeo - videos Tutorials - Videos Tutorials - Weird Most Popular on Internet Yahts, boats, Tall Ships

SoftFern (New Zealand LTD). 
Design and development by SoftFern 2003 - 2014 Graphics supplied by