Running DotNetNuke with .NET 4.0

27 Jul

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.

tags: DNN, DNN Administration, DNN Install/Upgrade
comments powered by Disqus

Content provided in this blog is provided "AS-IS" and the information should be used at your own discretion.  The thoughts and opinions expressed are the personal thoughts of Mitchel Sellers and do not reflect the opinions of his employer.

Connect with Mitchel

I hope the information here has been helpful. To stay connected you can also subscribe to blog updates via email, contact Mitchel about consulting services, or reach out for assistance via CodeMendor

Content Copyright

Content in this blog is copyright protected.  Re-publishing on other websites is allowed as long as proper credit and backlink to the article is provided.  Any other re-publishing or distribution of this content is prohibited without written permission from Mitchel Sellers.