Creating a development copy of a DotNetNuke website I had an Unrecognized attribute ‘requestValidationMode’ error. The development site was derived from the original, using mostly the same parameters, except the site URL and the IIS site.
The requestValidationMode error was given when I viewed the development site after copy and configuring. The error is shown more fully below, changes were required in IIS.:
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: Unrecognized attribute 'requestValidationMode'. Note that attribute names are case-sensitive. Source Error: Line 152: --> Line 153: <!-- allow large file uploads --> Line 154: <httpRuntime shutdownTimeout="120" executionTimeout="900" useFullyQualifiedRedirectUrl="true" maxRequestLength="12288" requestLengthDiskThreshold="12288" requestValidationMode="2.0" requestPathInvalidCharacters="<,>,*,%,:,\,?" /> Line 155: <httpCookies httpOnlyCookies="true" requireSSL="false" domain="" /> Line 156: <!-- GLOBALIZATION
To create the development version of the site I kept as much as of the configuration as possible the same. I had made a copy of the database and site files and created a new IIS site linked to these files.
The database user and password were maintained.
Before starting I had added the dev alias to the PortalAlias table.
To do this I accessed the database using the Miscosoft SQL Server Management Studio. From here navigated to the database and thence to the table PortalAliases.. Scrolling down through the list of portals for the site I set the value of IsPrimary to True for the development site and False for the production domain.
To be sure that the change was activated I edited the first line of the web.config file. (adding a new line/removing a new line as appropriate.
When I had created the separate instance in IIS I had allowed a new application pool to be configured. But left it unconfigured, proceeding to view the website in a browser.
By default the new application pool was using ASP.NET version 2, not version 4 as used by the original website.
I went back into IIS and selected the Basic Settings for the website. In the top row I clicked on the Select button and from the drop down list of Application pools selected the same one as per the main production website.
Refreshing the website was now OK, error free.


