DotNetNuke Error: Unrecognized attribute 'requestValidationMode'.

DNN > Troubleshooting
DotNetNuke Error: Unrecognized attribute 'requestValidationMode'.

Issue
Your site is displaying a message which includes:

Parser Error Message: Unrecognized attribute 'requestValidationMode'. Note that attribute names are case-sensitive.

Cause
When a site is running in ASP.NET 4,0/4.5 IIS adds the following code to the httpRuntime section of the web.config "requestValidationMode="2.0"" and allows a site running in ASP.NET 4.0 to use ASP.NET 2.0 validation. If a site has its ASP.NET version switched from 4.0/4.5 back to 2.0, this code is not removed but as the site uses the ASP.NET 2.0 validation mode by default it is not recognized as a valid attribute.

Resolution
There are two options to resolve this issue.  They are both listed below.

Option 1
  1. If your site is on a version of DotNetNuke that supports it, Change your site's ASP.NET version to 4.0
Option 2
  1. Disable requestValidationMode by following the instructions below.
  2. Open your web.config
  3. Search (CTRL+F) for requestValidationMode
  4. Edit the line from:
    <httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="2097151" requestLengthDiskThreshold="25819200" requestValidationMode="2.0" /> to:
    <httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="2097151" requestLengthDiskThreshold="25819200" />
  5. Save your web.config.
  6. Refresh your site.

Add Feedback