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
Click here to post a comment