Upgrade to DotNetNuke 4.5.5 From 4.x 

Due to popular request this article is an updated version of my DNN upgrade process.  Below I will walk you through all steps necessary to upgrade your DNN website from a previous 4.x version to the most current version 4.5.5.  This article is the third revision of my upgrade process documents and has been enhanced with user recommended tips as well as includes new recommendations from my experiences installing new versionf of DotNetNuke.

This document is geared towards performing an upgrade IN place directly to the web 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.

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 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.  If you would like information on how to backup a DNN installation I have a blog posting regarding backup procedures here on this site.

Once you have completed your site backup you will want to download the DotNetNuke 4.5.4 UPGRADE package from the DotNetNuke website.  I will explain what you need to do with this momentarily.

Once you have the backups in place if you have a favicon.ico file saved for your website that is different than the standard DotNetNuke one you will want to temporarily re-name 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.  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.

Configuring Your Setup

Now that your backups have been completed and you have the 4.5.5 upgrade package 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.5.5 upgrade 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: 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.

<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>".

<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.  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. Below is a sample of what this section might look like. NOTE: you might have multiple directory names listed

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

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.

<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!

Start the Installation Process

After completing the above setup you are now ready to start the upgrade process.  You will want 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?mode=upgrade.  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.

Modify Search Localization Files

One new item that is recommended after upgrading to 4.5.5 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 Thursday, July 26, 2007
 

Comments

One additional section of the web.config file that is very important to update is the smtp setting so that the site can use email services. During an upgrade, be sure to add the settings from the node <system.net> <mailSettings> <smtp> from your previous web.config file.

By Gene on Saturday, July 28, 2007 at 3:25 PM

Hi Mitchell

I followed your nicely detailed guide step for step BUT after the final step <yourSite>/Install/Install.aspx?mode=upgrade

I got the good old yellow screen of death! so I repeated the process 2x carefully again with the same result.

So I then renamed my DNN 454 web-old.config back to web.config and the DNN455 version to web-new.config and navigated to the site in a browser.

What I got was a screen with the text below.... much to my confusion!

Q: How do I upgrade the Database Version?
-----------------------------------------
Upgrading DotNetNuke
Current Assembly Version: 04.05.05
Current Database Version: 04.05.04

Upgrade Status Report
00:00:00.031 - Upgrading to Version: 4.5.5
00:00:00.062 - Executing Script: 04.05.05.SqlDataProvider Success
00:00:00.187 - Performing General Upgrades

Upgrade Complete

Click Here To Access Your Portal
------------------------

Thanks for the help!
Mike T

By MikeT on Thursday, August 02, 2007 at 2:15 AM

Mike,

From the looks of the message you posted the upgrade went successful with your old web.config.

If you access your site now and login as host under host settings it should show you as being on 4.5.5.

If you migrated from 4.5.1 or newer I do not believe there were any web.config changes so you should be ok simply using the old config file.

By mitchel.sellers@gmail.com on Thursday, August 02, 2007 at 3:39 AM

I am assuming the 'InstallationDate' is now optional and an old feature? My old web.config did not contain the entry (and neither did the new release). I just got into the game with the 4.5.2 release and didn't copy it over when I upgrades to 4.5.3. :) I am going to assume this isn't a show-stopper?

By Terp on Saturday, August 18, 2007 at 1:26 PM

I am not sure typically that value is there to tell DNN that it is an upgrade. It is quite possible that they modified the processes in 4.5.2 (But since no one says anything....I am not sure).

As long as after the upgrade you can login, it was not needed :)

By mitchel.sellers@gmail.com on Saturday, August 18, 2007 at 2:30 PM

I also recommend using BeyondCompare for your web.config changes. It makes it a lot easier to find and make the necessary changes for an upgrade. the have a free trial (http://www.scootersoftware.com/)

By John Studdard on Sunday, August 19, 2007 at 11:14 AM

Thanks for the clear and detailed instructions Mitchel. I just upgraded from 4.5.4 to 4.5.5 perfectly!

By DaveDel on Sunday, August 19, 2007 at 11:29 PM

Hi Mitchell,

Followed your instructions to upgrade to 4.5.5. However, when running Install/Install.aspx?mode=upgrade

I get a blank screen. It, then, works just fine to log into the portal and in host settings it seems like it has upgraded to 4.5.5. The problems occurs when I try to compile the code from the visual studio interface and I get all sorts of "funny" error msg which has not occured before.

Any ideas of how to attack this?

Best Regards

Carl Johan

By Carl Johan Bengtsson on Monday, August 27, 2007 at 6:21 AM

Were you previously running the full source version? (The one with the separate library folder as well).

If so you might try to upgrade using the new source version, be careful to not loose the web.config settings!

By mitchel.sellers@gmail.com on Monday, August 27, 2007 at 4:07 PM

I followed your instruction for the upgrade, but when I tried to go to the URL:
mysite.com/Install/Install.aspx

I get the Server error message:
Server Error in '/' Application.
--------------------------------------------------------------------------------

Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>


By Kewazi on Thursday, September 06, 2007 at 7:28 AM

Have you followed the instructions listed in the error message to modify the settings? Do you get a detailed error message?

By mitchel.sellers@gmail.com on Thursday, September 06, 2007 at 7:08 PM

Comments from the following blog entry: Upgrading a DotNetNuke Site to 4.5.5 from 4.x, located at: http://www.dotnetkicks.com/opensource/Upgrading_a_DotNetNuke_Site_to_4_5_5_from_4_x

By DotNetKicks.com on Thursday, September 13, 2007 at 11:02 AM

Mitchel,

I followed your instructions precisely and got the following database upgrade error when the database upgrade process completed:

Upgrading DotNetNuke
Current Assembly Version: 04.05.05
Current Database Version: 04.03.05

Upgrade Status Report
00:00:00.062 - Upgrading to Version: 4.5.5
00:00:00.093 - Executing Script: 04.03.06.SqlDataProvider Success
00:00:01.312 - Executing Script: 04.03.07.SqlDataProvider Success
00:00:01.656 - Executing Script: 04.04.00.SqlDataProvider Error! (see 04.04.00.log for more information)
00:00:04.671 - Executing Script: 04.04.01.SqlDataProvider Success
00:00:04.828 - Executing Script: 04.05.00.SqlDataProvider Success
00:00:10.625 - Executing Script: 04.05.01.SqlDataProvider Success
00:00:10.890 - Executing Script: 04.05.02.SqlDataProvider Success
00:00:12.140 - Executing Script: 04.05.03.SqlDataProvider Success
00:00:12.281 - Executing Script: 04.05.04.SqlDataProvider Success
00:00:12.390 - Executing Script: 04.05.05.SqlDataProvider Success
00:00:12.390 - Performing General Upgrades

Upgrade Complete

When I open the file 04.04.00.log, it simply displays: error: HelpURL

Can you please explain how I can troubleshoot this error?

Thanks,

Stefan
CSC Inc.


By Stefan on Tuesday, September 18, 2007 at 7:26 PM

Stefan,

I have noticed a few individuals reporting this type of error with the upgrade script, it was an error on a modification to the HelpURL column. Typically it is NOT an issue.

Is your site functioning properly? If not or you want more discussion on this topic please open a thread on my forum, thank you!

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

Ok, understand that I should ignore the error. However, my website does not come up. I am running the site using VS 2005 Professional. The site ran great before the upgrade.

When I click on the link

Click Here To Access Your Portal

I get a "The page cannot be found" error in the IE browser.

The URL displayed in the IE browser is incorrect: http://southfloridakiteboarding.com/wwwroot

The URL should be http://localhost:1269/wwwroot/default.aspx.

When I enter the correct URL into the address bar, the URL reverts back to http://southfloridakiteboarding.com/wwwroot

I will post this issue on your DNN Forum.

Thanks,

Stefan
CSC Inc.

By Stefan on Wednesday, September 19, 2007 at 5:34 PM

I followed your instruction for the upgrade of dnn 4.6.0, but when I tried to go to the URL:
mysite.com/Install/Install.aspx

I get the following Server error message.
I installed the line with the custom error tag.
No messages were displayed.
Do you have any suggestions for me ?

Server Error in '/' Application.
--------------------------------------------------------------------------------

Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>

By Ton Hermes on Friday, September 21, 2007 at 7:41 AM

This tutorial is great.
The upgrade to dnn 4.5.5 was sucsesfull
Thanks Mitchel

By Ton Hermes on Monday, September 24, 2007 at 10:57 AM

Mitchell:

I have a 4.03.05 install. Can I jump to 5.1.2? I did it last night and got an error, rolled it all back and thought you could tell me how to proceed.

I get the sense that maybe I need to do a couple of upgrades?


I am not looking for detailed advice, you have already done a great service above.

Thanks much,
Weezy

By Weezy on Thursday, September 24, 2009 at 4:23 AM

Hmmm....further reading may have answered my question!!

"... If you are on a version prior to DNN 4.6.2 and would like to upgrade, please see the article titled "Upgrading to DNN 4.9.0 from 4.x", this will get you to the latest 4.x release and then you can upgrade to 5.0.0. If you have questions about this requirement, please post to my forum on this site...."

By Weezy on Thursday, September 24, 2009 at 4:26 AM

Bingo! You found it.

In your case I would do the following.

4.3.5 -> 4.4.1 -> 4.6.2 -> 4.9.5 -> 5.1.2

Yes, it is a bit tedious, but I've had much better success with this type of upgrade...

By mitchel.sellers@gmail.com on Thursday, September 24, 2009 at 4:29 AM
Click here to post a comment

Disclaimer