Parser Error: Unrecognized attribute validateRequest

Problem

You get this error when running your application:

Server Error in XXX Application.

Configuration Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message:  Unrecognized attribute 'validateRequest'...

This error generally looks like:

Your application’s Web.config file is set with the Request Validation feature turned off.  This is typically because you are running .NET Framework 1.0.

Description

Microsoft added a new feature in .NET Framework 1.1 called Request Validation.  By default, each web page is checked to see that no raw XML is submitted.  Request Validation is not required for applications.  Details can be found at:

http://www.asp.net/faq/RequestValidation.aspx

Applications built with Iron Speed Designer assume you are running .NET Framework 2.0 or later.  If you have both .NET Framework 1.0 and .NET Framework 1.1 installed on your machine, this assumption may not always be correct.  Even though .NET Framework 2.0 is installed, your system (Microsoft IIS) may be configured to run applications under earlier versions of the .NET Framework.

Solution

Option #1.  To configure your application to work under .NET Framework 1.0, remove this line from your application’s Web.config file:

<pages validateRequest="false" />

It’s best to modify both the application’s Web.config file, which is located in:

...\<Application Folder>\Web.config

Option #2.  Alternatively, you can switch your system to run .NET Framework 1.1 or 2.0.  See Verifying the .NET Framework was Installed after Microsoft IIS for details on how to properly install and configure the .NET Framework so that it runs automatically.

See Also

Part IX:  Troubleshooting Applications

Application Will Not Run

Application Runs But No Data is Displayed

Application Error Messages