Upgrading to DotNetNuke 4.7.0 from 4.x 

This is my fifth revision DNN Upgrade guide.  This version of the document includes important updates for the upgrade process to DotNetNuke 4.7.0.  Many portions of this upgrade guide are the same as previous versions, however, there are some new items and many minor changes/clarifications.  This is simply due to the LIMITED changes that have truly occured in the area of DotNetNuke upgrades.  If a newer version of DNN has been released and I do not have a new version of this document, please use this version as there are most likely no breaking changes!

This guide is geared towards performing an upgrade in-place directly to the server.  If you are on a hosted web server you will need to make modifications to the instructions to fit your access to the production environment.  Additionally I STRONGLY suggest attempting to perform an upgrade locally BEFORE you update a production hosted site to check all processes, then use a method to deploy the upgrade in a prompt manner to minimize site downtime.  If there is enough demand I will post a "Upgrading DotNetNuke from 4.x to 4.7.0 (or later) on a Remote Host" guide.

Getting Ready

Even though the upgrade process is fairly simple and should not result in any critical errors it is very important that you perform a FULL site (file system) and database backup prior to starting your upgrade.  Having a backup grants you a few options should a situation arise where your portal doesn't function correctly on the new version of DotNetNuke.  Be sure to validate the integrity of your backups before continuing.  If you would like information on how to backup a DNN installation you may view my "Backing up a DNN site and database" tutorial.

Once you have completed your site backup you will want to download the DotNetNuke 4.7.0 install package from the DotNetNuke website.  I will explain what you need to do with this momentarily.  For those that have used my install guides in the past I have changed my opinion on the usage of the install/upgrade packages.  I have found that it is safer to use the "install" package to do the upgrade.  The install package will also result in your core modules being upgraded at the sime time, minimizing site downtime.  If you have compelling reasons to not use the Install version you may use the upgrade version, however, there will be slight differences when using that package with this guide.

Once you have validated your backups and downloaded the most recent version of DNN you will want to backup your favicon.ico file if you have a non standard icon.  I recommend temporarily re-nameing this file to something like favicon_site.ico so that it will not get overwritten in the upgrade process.  A second alternative to this would be to stage the upgrade on another folder before overwriting and remove the favicon.ico file from the upgrade files. 

The last item that you should do prior to starting  the upgrade process is to create an "app_offline.htm" file.  This is a simple HTML document that you can place in your DNN root directory and it will take your website offline.  This serves two purposes; first you prevent your users from experiencing any errors as the files are copying and secondly you prevent anyone else from accidentially triggering your upgrade process before all files are uploaded.  For my websites I simply put a notice that the site is temporarily unavailable due to upgrades in process, this same message will be displayed to visitors from ALL portals.  You MUST remove this file before you will actually be able to trigger the upgrade, that is why we will turn off "AutoUpgrade" later in this guide!

At this time you will want to test that the app_offline.htm file is working by simply trying to navigate to your site, you should see the content of your app_offline.htm file instead of your site content. 

Update Web Configuration (Copy from old)

Now that your backups have been completed (including favicon.ico),  you have the 4.7.0 package downloaded, and you have created your app_offline.htm file and tested to ensure it is displaying to users we are ready to actually perform the upgrade. First, you will want to rename your current web.config file to web.config.old. This will keep the file around as in a few moments we will be merging settings from this file into the new web config file.

Now you need to extract all files from the 4.7.0 install package into your root DNN folder. You will need to confirm the overwriting of your files. Once this process has completed, rename the release.config file to web.config and perform the following tasks using the information from your web.config.old file.

NOTE: You will need to delete any existing web.config file before renaming release.config, be 100% sure that you have a backup of your origional file before doing this!

NOTE: If you are on a shared hosting environment you are most likely completeting these changes on your local machine and can still have your production site active.  This depends soley on how/where you are extracting files.

Update Connection Strings

Be sure that the proper connection strings are loaded for your setup, both in the <connectionstrings>and <appsettings> sections of your web config, examples are provided below.  With these settings remember that you should only have 1 value per section. 

<connectionStrings>
    

    
<add name="SiteSqlServer" connectionString="<yourconnectionhere>" providerName="System.Data.SqlClient" />
  
connectionStrings>
  
<appSettings>
    
<!-- Database connection string (SQL Server 2000 or 2005 - kept for backwards compatability - legacy modules -->
    
<add key="SiteSqlServer" value="<yourconnectionhere>" />
    

Turn off AutoUpgrade

By default DotNetNuke will be set to "AutoUpgrade", this means that the first user to hit the default.aspx page on any portal within your DNN installation will trigger the upgrade process.  This is typically not a desired result as if an error occurs you might not be able to see the error log since the other individual started the upgrade.  The way around this is to update the "AutoUpgrade" appSetting, if you set this to "false" you will be required to navigate to the <yoururl>/Install/Install.aspx page to perform the upgrade.

<add key="AutoUpgrade" value="False" />
Copy Machine Key and Validation Key Values

Another very important item to copy over is your machine and validation keys. These are the keys used to encrypt and decrypt passwords and other information within your application. If you forget these items your users will not be able to login to the system. This declaration is typically just after the opening <system.web> tag. Below is an example of the machine key, the values you will be concerned with are the ones that note "<value to copy>". 

TIP: If after the upgrade you are unable to login these values are the first ones that you should check!

<system.web>
    
<machineKey validationKey="<value to copy>" decryptionKey="<value to copy>" decryption="3DES" validation="SHA1" />
    
Copy CodeSubDirectories Section (if used)

Depending on the modules you have been using in your website you might have a <codeSubDirectories> section within your web config.  If you have this section and it is NOT commented out you must be sure to copy this section otherwise you will encounter a compile-time error and your site will not display!.  DotNetNuke will automatically add this section if you installed a module that uses C# as its programming language rather than VB. If this section exists it is a sub-element of the <compiliation> section of your config file. Below is a sample of what this section might look like.

NOTE: You might have multiple directory names listed

TIP: Be sure to only have 1 <codeSubDirectories> section in your web.config, don't accidentally copy a second un-commented section as it will result in error.

<codeSubDirectories> 
   
<add directoryName="sub-directory name"/> 
<
codeSubDirectories>
Copy the InstallationDate Application Setting (If Exists)

The last standard configuration element that needs to be copied over is the InstallationDate key. This is used to identify the time of last installation, it is a good idea to copy this over even though it does appear to be an optional step according to DNN documentation. Below is the format for the key, it is contained within the <appSettings> section. 

NOTE: If you have installed dnn 4.5 and later only this setting most likely will NOT exist in your web.config and should not cause any difficulties.

<add key="InstallationDate" value="9/21/2006" />
Copy any other custom configuration options or added config sections

If you have customized any other configuration settings or added new sections to the configuration you will want to add those to your new web config file at this time.  One section you might want to quickly check is the httpRuntime section as many individuals have modified this section to allow for larger file uploads and you will want to be sure to copy those settings. Once you have completed this, it is time for the next and final step!

TIP: The usage of a file comparison tool might help you quickly identify any other "custom" sections of the web.config that you need to update

Start the Installation Process

After completing the above setup you are now ready to start the upgrade process.  You will need to delete your app_offline.htm file if you created one so that you can access your site again.  Now simply navigate to <yourSite>/Install/Install.aspx.  If you are directed towards an "Under Construction" webpage please simply try this request again.  In my testing with DNN 4.7 I noticed that evey couple of installs would result in this direction on the first attempt at upgrading.  In some cases I needed to try it 3-4 times to get the upgrade to start, just be sure that on your additional attemts that you are trying to go to install/install.aspx and not directly to the under construction page.

Once the page appears you should see a status screen that shows you the progress as the site is upgraded.  At the end you should see an upgrade complete message with a link to your portal.  You should not see ANY errors on this page, if you encountered an error be sure to note ALL information displayed so you can investigate the issues.  This status screen should look like the following.(obviously displaying 4.7 for you)

Upgrade progress screen

Modify Search Localization Files

One optional item that is recommended after upgrading to 4.7.0 is to modify the localization file for the search.ascx control to include your own Google Adsense id rather than the one for DotNetNuke. If you do not have your own Google AdSense id you can get it from the Google AdSense website. You can modify this value by using the language editor and navigating under Admin/Skins/App_LocalResources/Search.ascx.resx. The value you need to change is directly after the "&client=" portion of the URL. This way you get credit for the adsense links!

Please feel free to share any comments/concerns below!  If you have specific questions, please use my DotNetNuke forum to ask those questions!

Posted by Mitchel on Monday, November 12, 2007
 

Comments

Comments from the following blog entry: Upgrading from DNN 4.x to 4.7, located at: http://www.dotnetkicks.com/opensource/Upgrading_from_DNN_4_x_to_4_7

By DotNetKicks.com on Tuesday, November 13, 2007 at 5:28 AM

Mitch, just wanted to comment on your excellent tutorial. I was having some issues with my sites and needed to upgrade. Your step by step instructions were on the money (I would have never known to use the Install version instead of the Upgrade version).

Thanks!
Mike Rogers

By Mike Rogers on Tuesday, November 20, 2007 at 6:08 PM

would love to see the guide for upgrading a 4.x REMOTE site to 4.7.

In the article above, it fails to mention which "type" of install process to select: Custom, Typical, or (legacy?)

By Mike Schoonmaker on Wednesday, November 21, 2007 at 9:43 AM

Mike Schoonmaker,

When upgrading you shouldn't be presented with the installation wizard. if you see the wizard I would imagine that your connection string values are not correct as DNN believes it is a new install.

The process to upgrade on a remote host is quite similiar, but basically you stage your modified files locally, then upload them. I'll try to get a specific tutorial up for that soon.

By mitchel.sellers@gmail.com on Wednesday, November 21, 2007 at 10:03 AM

Outstanding advice. excellent step by step instructions. Thankyou

By Mark Cadby on Saturday, November 24, 2007 at 4:47 AM

This tutorial is GREAT.
It has clear steps and a logical flow.
I did the upgrade from 455 to 470 in 1 attempt.
Many thanks Mitchel.
With regards, Ton Hermes

By Ton Hermes on Saturday, November 24, 2007 at 8:11 AM

Hi, I tried twice to upgrade a 4.6.2 to 4.7.0 following your instruction but everytime I run <yoururl>/Install/Install.aspx the installation is run instead of the upgrade. What else am I missing?

By Gaspare Carrani on Thursday, December 06, 2007 at 1:05 AM

OK...I got it... I forgot to update objectQualifier value... now it works fine... excellent walkthrough

By Gaspare Carrani on Thursday, December 06, 2007 at 2:00 AM

Thanks Mitch!

Dang I was amazed and happy to see that DNN upgrade screen clicking away! My site appears fine but I did receive some error messages. Should I be concerned? Where can I review them? Here is a link to the screen shot: http://www.meepi.org/will/pmupgadeto47.jpg

Thanks for doing this!

Will Sugg

By Will Sugg on Tuesday, December 18, 2007 at 4:01 AM

Will,

You can find the files in the /Providers/DataProviders/ folders

By mitchel.sellers@gmail.com on Tuesday, December 18, 2007 at 4:22 AM

Mitchel, is this can be applied to upgrade from 4.3.4 to latest version?

Because i remember there was a FTB to FCK issue. Anyway i will test and post results here :)

By Ismet Dumlupinar on Tuesday, December 18, 2007 at 11:51 PM

Ismet,

You shouldn't have any problems, the big thing with FTB -> FCK is to be sure that you are using the NEW web.config as a base as it has the FCK configuration in it.

By mitchel.sellers@gmail.com on Wednesday, December 19, 2007 at 3:36 AM

I used the above instructions to successfully upgrade to 4.7.0. Will these work equally well to upgrade to the new release 4.8.0?

By Mark Cadby on Friday, December 28, 2007 at 7:33 AM

Mark,

Yes, they should be just the same. I am going to go through and test all and publish new article versions over the weekend, but I'm not aware of any major changes.

By mitchel.sellers@gmail.com on Friday, December 28, 2007 at 7:47 AM

I gave it a go anyway and it was fine. I am now happily running on 4.8. Looks like you will not have to update your document. Thanks again for such clear and complete instructions.

By Mark Cadby on Friday, December 28, 2007 at 8:53 AM

I just recently followed the above mentioned steps to update my dnn installation and I received the following error:
Installing DotNetNuke
Version: 04.08.00


Installation Status Report
00:00:00.031 - Installing Version: 4.4.0
00:00:00.031 - Executing Script: DotNetNuke.SetUp.SqlDataProvider Success
00:00:00.328 - Executing Script: DotNetNuke.Schema.SqlDataProvider Error! (see DotNetNuke.Schema.log for more information)
00:00:09.937 - Executing Script: DotNetNuke.Data.SqlDataProvider Error! (see DotNetNuke.Data.log for more information)
00:00:10.656 - Installing MemberRole Provider:
00:00:10.656 - Executing Script: InstallCommon
00:00:11.296 - Executing Script: InstallMembership
00:00:12.187 - Executing Script: InstallProfile
00:00:12.265 - Executing Script: InstallRoles
00:00:12.500 - Upgrading to Version: 4.8.0
00:00:12.531 - Executing Script: 04.04.01.SqlDataProvider Success
00:00:12.609 - Executing Script: 04.05.00.SqlDataProvider Success
00:00:13.343 - Executing Script: 04.05.01.SqlDataProvider Success
00:00:13.781 - Executing Script: 04.05.02.SqlDataProvider Success
00:00:14.015 - Executing Script: 04.05.03.SqlDataProvider Success
00:00:14.140 - Executing Script: 04.05.04.SqlDataProvider Success
00:00:14.156 - Executing Script: 04.05.05.SqlDataProvider Success
00:00:14.171 - Executing Script: 04.06.00.SqlDataProvider Success
00:00:14.750 - Executing Script: 04.06.01.SqlDataProvider Success
00:00:14.750 - Executing Script: 04.06.02.SqlDataProvider Success
00:00:14.765 - Executing Script: 04.07.00.SqlDataProvider Success
00:00:14.890 - Executing Script: 04.08.00.SqlDataProvider Success
00:00:15.359 - Performing General Upgrades
00:00:15.781 - Loading Host Settings:
00:00:15.890 - Configuring SuperUser:

I believe I was upgrading from 04.05.03 to 4.8.

Any thoughts?

By Brad Linger on Tuesday, January 01, 2008 at 11:50 AM

If you can post the details from the listed logs to my forum I can try to help you.

By mitchel.sellers@gmail.com on Tuesday, January 01, 2008 at 8:34 PM

Hey Mitchell,

I just upgraded a site from 4.1 to 4.7 following these instructions, and got to the DNN install screen with all successes. Now I ma getting this error when I try to add a module:
A critical error has occurred.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Thanks,

Will

By Will Sugg on Friday, January 04, 2008 at 10:26 AM

Will,

It sounds like you need to update the connectionString value that is in the appSettings section to reflect the proper SQL Server address.

By mitchel.sellers@gmail.com on Friday, January 04, 2008 at 11:23 AM
Click here to post a comment

Donate

Show your appreciation for the content/modules made available by MitchelSellers.com by making a donation. Donations are used to assist with dedicating time to creating free content.