There's something out there in life that will delight and amaze you.
Get up, get moving, and go find out what it is. - (Ralph Marston)

Friday, June 08, 2007

How to upgrade a DotNetNuke web site in version 3.2.x to version 4.4.1

Upgrading web sites that was created in DNN 3.2 or older versions to newer versions has become a common need today, due to the latest browsers and upcoming features that new versions provide. For example the IE7.0 does not display the tool bar of the FreeTextBox of the site created in DNN3.2 or later versions.

So here are the steps to follow to convert a DNN 3.2 web site to DNN 4.4. First, test this in a QA environment rather than trying on the production server.

  • Backup the web site database and the web sites folder that contain all the files.
  • Unzip the DNN 4.x installation package to any of the folders, then open up the web.config file.
  • And do the following changes, and use the web sites web.config file as the source to obtain the following details.
  • Set the
    • Database name
    • Machine Validation key value.
    • DecryptionKey value.
    • Database Owner
    • ObjectQualifier

as same as the web.config file of the web site. Also make sure you copy any other settings you have made in the web sites web.config file.

  • Now that you have done the necessary changes; copy the dnn4 folder contents to the web sites folder contents, this process will over ride the web config as well a so other files.
  • Now go to IIS and select the folder that you have set this site to run and change the DotNet engine to 2.0 version.
  • Now our web.config file will still be pointed to the production database of the test machine. Once we browse this site; what happens is that the contents for a DNN4 database will be installed on top of your production database through the application. And it will show up an upgrading screen in the portal. Once it is success it will create a link to browse the site.

If you check the database; some of the existing tables will now appear with additional fields. Further, during the upgrading if there was any problems it will be logged and the log will be pointed for you knowledge.

The process of converting is very straight forward, but its always advisable to get a back up of your files and convert the site.

Its often the case where some of the custom modules you've created, may give problems during a site upgrading. One solution to this would be to uninstall the module and convert that particular module to DotNet 2.0 and then re-install.

DotNetNuke upgrading allows you to retain your data as it is and upgrade the web site successfully.

Briefing on Installing DotNetNuke 4.x

Thought to share a tiny sereat, since its a bit messy to figure out the process of installing DNN4. Well, its basically same as DotNetNuke 3.x but rather you should have .NET Framework 2.0 already installed as a prerequisite.

First visit the site DotNetNuke and download the latest version of DotNetNuke source. Now, there are two files to download, but select based on your requirements for example if you are developing your own nuke modules, its advisable to install the source, or else go for the general installation.

One significant point about nuke is that; its so easy to mess unless you don't know what to be done. For a simple example, if you unzip the downloaded source to a folder name you desire then you are in trouble. Just extract to the contents to a folder that creates by default in the same driver. Then go to C:\DotNetNuke_4.4.1_Source\Website\Documentation\Readme.txt path and you will find a read me text document; which explains every step to follow. In simple terms it goes as follows.

Now that you have un-zip the folder, and now create a virtual directory in IIS. Now If you open the folder of the contents you will come across with the Website folder, Library folder and the solution file, just point the virtual directory path to the Website folder since it has the project file.

If you already have dnn3 installed; there is nothing to bother since you will be installing this to a completely different folder and we will be mapping to a new database.

Once you create the virtual directory, make default.aspx as the top and make the Dotnet version to 2.0xxx Now go back to your folder and properties and make sure you have given the permission for the Network services user and as well as aspnet user, full control. Now open up Sqlserver 2000 or 2005. and create a database by any name.

once that is done, go back to the folder and rename the release.config to web.config and change the connection string properties. In Nuke version 4.x it the database connection is specified in two places. So it needs to be changed accordingly.

Now open the IE and browse http://localhost/VirtualFolderName and there you go the DotNetNuke4.x will be installed nice and smoothly.