Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...requestValidationMode="2.0" automatically being added to my web.config when using ASP.NET 4.0requestValidationMode="2.0" automatically being added to my web.config when using ASP.NET 4.0
Previous
 
Next
New Post
3/6/2012 12:38 PM
 

Hello everyone,

I'm having an interesting issue with my sites and I can't seem to find a solution online.  When I enable client side errors, I would get:

<SNIP>

Configuration Error

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 193:    <httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="8192" requestLengthDiskThreshold="8192" requestValidationMode="2.0" />

</SNIP>

The settings on my site changed somehow (automatically, hosting support employee, I'm not sure) to use ASP.NET 4.0 instead of 2.0 and I think that's what started this issue.  Whenever I delete the requestValidationMode="2.0", everything will run fine for a while, then after a while, it goes down again with the same error and I discover that the attribute had again been added to my web.config.  I was using DNN 5.4, but upgraded to the latest version of 6 thinking it would support .net 4.0 and stop giving me this issue.  Unfortunately even after upgrading I was still getting the error message (it seems random).

I did some searching online and found this on another forum:

"DNN adds the attribute in question when it detects ASP.NET 4.0 (unfortunately we cannot do the reverse as the request fails in ASP.NET before it reaches us."

Does anyone know if there is there any way to prevent DNN from modifying my web.config automatically and adding this attribute?

Thanks,

Kevin

 
New Post
3/6/2012 3:58 PM
 
write protect your web.config file.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
3/6/2012 4:26 PM
 

But would write protecting it mess with any other DNN functionality?

 
New Post
3/7/2012 12:34 AM
 
actually requestValidationMode is only recognised by .net 4.0 - so if you see that issue it means your application pool has been set to .net 2.0 hence the error. The fact that you later on see it being added back and the site running ok would suggest to me either that something changes the application pool to 2.0 periodically (though what I can't imagine) or else that you are running in a webfarm/cluster and different webservers are set to use different application pool . net versions. This is (obviously) something that needs to be resolved so I would raise it with your hosting department/hosting provider. Note: write-protecting web.config may allow you to work around this but that attribute is added to fix a breaking change in .net 4.0 (see http://jefferytay.wordpress.com/2010/04/15/asp-net-4-breaking-changes-1-requestvalidationmode-cause-validaterequestfalse-to-fail/ ) so whilst your site may run various functions will not work as expected/throw exceptions.

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
3/7/2012 5:31 PM
 

Yeah, I am using a hosting provider (webfarm) but I've set my application pool to use 4.0 and it gives me the error with the requestValidationMode attribute.  I thought that it was being set back to 2.0 as well, so I would check randomly (as it was mysteriously changed to 4.0, which is when I starting having this issue) and it was still unchanged.

I would love to raise it with my hosting provider, but their service is somewhat..........sad.  I've had issues with them (very simple issues, like file permission issues) that have taken almost a month to resolve.  This would probably blow them out of the water.  I really need to find a better hosting service.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...requestValidationMode="2.0" automatically being added to my web.config when using ASP.NET 4.0requestValidationMode="2.0" automatically being added to my web.config when using ASP.NET 4.0


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out