I recently needed to upgrade a DNN V5 site  to V7 (yes I know I had neglected it, but I was forced to consider a change due to an ISP change). Now this is a documented process, but I had a few problems. There are some subtleties the release notes miss out. This is what I found I had to do to test the process on a replica web site …

Setup the Site

  • I restored a backup of the site SQL DB onto a SQL 2008R2 instance running on Windows 2008R2.
  • On the same box I created a new IIS 7 web site and copied in a backup of the site structure and setup the virtual application required for my DNN configuration.
  • I made sure the AppPool associated with the site and application was set to .NET 2.0 in classic mode.

image

  • I fix the connection strings to the restored DB in the web.config (remember there are two DB entries, one in ConnectionString and one in AppSettings).
  • At this point I thought it was a good idea to test the DNN 5 site

The Upgrade

  • I copied over the contents of the DDN V7 upgrade package
  • I changed the AppPool from .NET 2.0 Classic mode to .NET 4.0 in Integrated pipeline mode
  • I tried to load the website – at this point I got an ASP.NET 500 Internal error

An aside – If I used a Windows 8 PC (using IIS 7.5) all I got was the 500 internal error message, no more details. I am sure you can reconfigure IIS 7.5 to give more detailed messages. However, i chose to Windows 2008R2 and IIS7 which gave me a nice set of 500.19 web.config errors

  • The issue was I needed to edit the web.config to remove the duplicate entries it found, they are all in the form. Just remove the offending line, save the file and refresh the site.

image

  • I then got the unhelpful DotNetNuke Error. Turns out this down to the wrong version of Telerik DLLs. They are not shipped in the DDN 7 upgrade package,  I just copied the bin folder from the DNN 7 Install package which contains the right versions

image

  • The DNN upgrade wizard should now load. I entered my login details and let it run, it took about a minute.

image

The site might still not load (showing the error below), this is because the DB stores the sites based on the full domain name, so trying to load using something like http://localhost/dnn may not work (unless you configured it as the address). I had to edit the hosts file on my PC so my full domain name e.g http://www.mydomain.com/dns resolved to 127.0.0.1. The alternative is to (if you can connect) on the hosts > site management > edit the site > site aliases and enable ‘auto add site alias’. if this is done you can connect with any address

image

503 Problems

Now that should be the whole story, but I still had problems. I kept seeing 503 errors

image

On checking I found the AppPool kept stopping. The event log showing

Application: w3wp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an internal error in the .NET Runtime at IP 000007FEF8E21550 (000007FEF8E20000) with exit code 80131506.

and

Application pool ‘DDN’ is being automatically disabled due to a series of failures in the process(es) serving that application pool.

I tried a clean install of DNN 7 to it own DB (on the same server) using the same AppPool. This all worked fine. So I had to assume the problem lay with either

  1. My web.config
  2. My upgraded DB
  3. Some assembly in my installation

Reading around hinted that AppPools stopping could be due to having mix .NET 2/3.5 and 4.0 assemblies. So I was favouring option 1 or 3

In the end I chose to use the web.config from the DNN V7 installation package. I just copied this over the upgraded one and edited the connection strings. I also had to replace the machine key entry.

This has to swapped as this is used to decrypt data such as passwords from the DB, if you don’t do this you can’t login in.

Once this new web.config was changed the site loaded without any errors. I never tracked down the actual line in the web.config that caused the problem.

DNN Log Errors

I repeated this upgrade process a few times before I got it right. On one test I saw errors in my ./DNN/Portals/_Default/Logs in the form

2013-05-13 21:46:50,505 [TyphoonTFS][Thread:14][ERROR] DotNetNuke.Services.Exceptions.Exceptions - System.Data.SqlClient.SqlException (0x80131904): The INSERT statement conflicted with the FOREIGN KEY constraint “FK_ScheduleHistory_Schedule”. The conflict occurred in database “dnn”, table “dbo.Schedule”, column ‘ScheduleID’.

I fixed this by deleting the contents of the a dbo.ScheduleHistory table. However, I think this is a red herring as when I got the rest of the process OK this error was not shown.

Content Update

Finally I could upgrade the skin being used by the site to make it look like a DNN 7 based site.

  • Most importantly for me was to get the new admin look by changed the way the DNN admin menus are shown. This is done by changing the Host Settings > Other Settings > Control Panel to CONTROLBAR. This gets you the new menu banner model at the top of the page (this took me ages to find!)

image

  • I updated my extension modules (Host > extensions). This page shows which modules have updates. Click on the green update link to download the package. Then the use the ‘Install Extension Wizard’ button at the top of the page to install them.

image

  • Finally I started to changed from a V5 skin to one of the DNN V7 ones, I was using a customised version of the old default of MinimalExtropy, I swapped to the new  one based on the new default Gravity

So this is still a work in progress as with any CMS solution. Now I need to repeat the process by moving my installation from the old ISP to the new one.