Running DotNetNuke with .NET 4.0 

As more and more people start working with DotNetNuke, IIS7, and .NET 4.0 it is important to note a few important potential problem areas when it comes to running DotNetNuke on the 4.0 framework.  Recently I took a DNN 5.4.4 installation and tried running it under .NET 4.0 and without modifications, it was a complete failure, in this blog posting I will show you what needs to change to allow DotNetNuke to work as expected.

In my test I noticed that after switching my application pool to run on .NET 4.0 a number of DNN functions stopped working such as the logoff page, the captcha control, and more critically LinkClick.aspx which is used for file linking.  This issue only impacted my installations running on Windows 7 and Windows Server 2008, my Windows XP and Windows 2003 machines were working just fine, which led me right to the issue, the web.config file.

In the web.config file there are a collection of nodes, <system.webServer><handers> with a number of <add ... nodes underneath.  This section of the web.config is used by IIS7 to auto configure DNN and is where the problem comes in.

Many of the handlers here have the following attribute defined "preCondition="integratedMode,runtimeVersionv2.0""  The key issue here is the runtime version, which is going to cause major issues, as when running in 4.0 this handler is bypassed, breaking functionality.

To resolve the issue simply remove the "runtimeVersionv2.0" portion from the pre-condition and you should be up and running.  I recommend removing this pre-condition from ALL handlers in this section.

Feel free to share your comments below with any other issues you may have experienced with .NET 4.0 and DNN.

Posted by Mitchel on Tuesday, July 27, 2010
 

Comments

I just spent today trying to figure this issue out.
I also came across an interesting post from Microsoft on the breaking changes with asp.net 4.0 with relevance to markup, web.config and other items. It's worth reading if your considering moving up to 4.0.

http://www.asp.net/learn/whitepapers/aspnet4/breaking-changes

By usheen on Tuesday, July 27, 2010 at 11:23 AM

Yup, I had the exact same experience.

By David O'Leary on Tuesday, July 27, 2010 at 12:39 PM

Hi,
Just moved my DNN 5.01.02 sites to Windows 2008 R2 Server with IIS 7.5 a week ago - and have similar problems. The suggested changes in web.config seems not to solve my problem. The strange thing is that the sites are "unstable" - one moment the logout (and all other links that dos doPostBack's) dos not work and at other times it works as expected. Any ideas how to track this problem down? Thanks.

By Kim on Tuesday, July 27, 2010 at 11:54 PM

I'm a rookie , I'm still using VS2005 now

By Zenoven on Monday, August 09, 2010 at 9:58 PM

So what you're saying is that if I build a site with DNN I can look forward to it having problems when my hosting co upgrades!

By bman on Monday, August 23, 2010 at 4:46 AM
Click here to post a comment

Disclaimer