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

I get a database timeout expired error on my ASP.NET application. What can I do?

I get the following error when my ASP.NET application connects to the MS SQL server:...

I couldn't see any Error Message on my ASPX Page? What should I do?

This happens because of the web.config custom Error page is set to RemoteOnly or On. If you...

How do I configure my ASP.NET 3.5 Framework?

To configure your ASP.NET3.5 Framework, it is pretty easy via our control panel. For Old In...

How do I setup custom error for my ASP.net application?

ASP.net has its own built-in error handling. To set up custom error handling for your ASP.net...

ASP.NET Validation is not working on your server.

...