I get an error 'A potentially dangerous Request.Form value was detected from the client ' when I hit submit on my ASP.NET Webform. What can I do?

This error is caused by a newly introduced feature of .NET Framework 1.1, called "Request Validation"  This feature is designed to help prevent script-injection attacks whereby client script code or HTML is unknowingly submitted to a server, stored, and then presented to other users.

To resolve the problem, you can either :

  1. Disable Request Validation in the web.config file
  2. Disable Request Validation in the Page itself by setting attribute validateRequest=false in Page Directive.

<%Page Language =C# validateRequest=false%>

Was this answer helpful?

 Print this Article

Also Read

How do I get my ASP.net application to display non-English language


Why can I still access my ASP.NET pages even though I disabled anonymous access to my directory?

After disabling anonymous access in the permission manager in the control panel, ASP.net pages...

How do I connect my ASP.net application to MySQL database?

In general, 2 different methods can be used to connect an ASP.net application to MySQL database....

I am using ASP.NET and Internet Explorer Web Controls and it does not work when I open the page. What is wrong?

For Internet Explorer Web Controls to work properly you need to have the required HTML...

I get a configuration error when I execute my application in a subdirectory. How do I resolve this?

This error may occur if the application is being run out of a subfolder and the subfolder is not...