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
- If your site is on a version of DotNetNuke that supports it, Change your site's ASP.NET version to 4.0
Option 2
- Disable requestValidationMode by following the instructions below.
- Open your web.config
- Search (CTRL+F) for requestValidationMode
- Edit the line from:
<httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="2097151" requestLengthDiskThreshold="25819200" requestValidationMode="2.0" /> to:
<httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="2097151" requestLengthDiskThreshold="25819200" />
- Save your web.config.
- Refresh your site.
Article ID: 1828, Created: February 8, 2013 at 8:37 AM, Modified: August 25, 2014 at 2:38 PM