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

Problem

The following “yellow screen” error occurs in your application:

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

Description

Microsoft .NET Framework 1.1 causes this due to enhanced security features (request validation).  Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted.  This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack.  You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section of Web.config.  However, it is strongly recommended that your application explicitly check all inputs in this case.

Solution

Step 1:  Locate the ASP.NET settings in:

<Application Folder>\Web.config

Step 2: Set the value of validateRequest attribute of pages element to false.

<pages validateRequest="false" />

See Also

Part VII:  Troubleshooting Applications

Application Won’t Run

Application Runs But No Data is Displayed

Application Error Messages