Search
  
 
Mitchel Sellers' DotNetNuke, .NET, and Other Topics BlogMinimize
 
 
Subscribe To Blog Updates by E-Mail

Current Articles | Categories | Search | Syndication

   
 Upgrading to DotNetNuke 4.8.0 from 4.x
By Mitchel Sellers on Friday, January 04, 2008 @ 10:17 AM
 
  1765 Views :: 20 Comments :: :: DotNetNuke, Tutorials
  
 

This is my sixth revision DNN Upgrade guide.  This version of the guide includes important updates for working with DNN 4.8.0 and customized SqlDataProvider configurations.  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.8.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.8.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 main advantage to using the install package is that critical core DNN modules will be updated as part of the installation process.  Typically this only includes the Text/HTML and a few other modules.  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.8.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.8.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 original 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 Object Qualifier and Database Owner Values (if used)

If when you completed your first DNN installation you specified special settings for Object Qualifier and/or database owner in the providers section be sure to copy these values to the new web.config file.

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.  WinDiff is an application others have mentioned is helpful.

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.8 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.8 for you)

Upgrade progress screen

Modify Search Localization Files

One optional item that is recommended after upgrading to 4.8.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!

Known Upgrade Issues

The only known breaking upgrade issue that I am aware of is for users that have the Active Directory Authentication Provider activated with auto login enabled. If you have this funtionality enabled in your existing site, please be cautious when upgrading your DotNetNuke site as it is possible that your site will be unavailable after upgrade. Per the Active Directory Provider forum on DotNetNuke.com the fix is to install version 01.00.02 of the provider BEFORE the upgrade.

Comments/Suggestions/Questions

Please share comments and suggestions below. If you have a question regarding a specific error message or an error that you have experienced please use my support forums to keep the comments here clutter free.

 
  
 Share/Save This Article 
 

Use the below controls to save this article to one of many popular social bookmarking sites!

   kick it on DotNetKicks.com  
 
  
 Article Rating 
  
  
 Article Comments 
 
By Déclic Vidéo FX @ Saturday, January 05, 2008 11:23 PM
What about the Friendly URL ???
I am using Ventrian Friendly URL, and I do not know if I can/should upgrade, I am afraid of breaking all my URL...

DV

By Mitchel Sellers @ Sunday, January 06, 2008 6:27 AM
DV,

You should be ok, but when using custom modules, I highly recommend pulling a local copy of your site and trying the upgrade locally before upgrading the actual site.

Just be sure to copy any and all configuration of that module that might exist in the web.config.

By Vicenç Masanas @ Saturday, January 12, 2008 9:38 AM
Michael,
if you put the favicon.ico under the portals/n/ folder it will not be overwriten by default ico file.
This also allows you to have differents favicons for different portals.

By moto @ Monday, January 14, 2008 1:09 PM
is it the same if im in dnn 4.3.7?

By Ton Hermes @ Tuesday, January 15, 2008 8:27 AM
Hi Mitchel,
First, Thanks for this great handout.
Last time I upgraded to 470 with (as you sugested) the install package.
Now I have in HOST->MODULE DEFINITIONS a section with "available modules", in there is a list with modules availabe for installation.
I have these modules already installed.
They do not any harm, but it is not nice to see them there.
Is ther a way to avoid these extra installations?
With regards, Ton Hermes

By Mitchel Sellers @ Tuesday, January 15, 2008 9:21 AM
In that case you can simply remove the files that end in .resources from the /Install/Modules folder.

By David Snow @ Friday, January 18, 2008 1:37 PM
I followed you instructions to use the "install kit" and they worked out well, with one exception. You need to know which language elements that you have changed and save them prior to the installation. I have changes the "terms" and one registration messages.

In my case I did the 4.8.0 install on a localhost "clone" of the site, and just cut and pasted these language items from the production site into the localhost clone.

When I had fully tested the clone I "backed up, zipped up and uploaded" the site to the production server.

By Mitchel Sellers @ Friday, January 18, 2008 5:12 PM
David,

That is a very good point. I do believe that you run the risk of looking customizations to language settings regardless of which package you use...I'll be sure to note this in my next revision of the article.

By Joe Craig @ Monday, January 28, 2008 4:18 PM
Hi, Mitch!

Have you seen any issues with upgrading from versions less that 4.6.2 directly to 4.8?

I have, and more than once. One poster in the DNN forums said that this is related to out of date dlls in the bin directory.

However, when those upgrades have failed, an upgrade to 4.6.2 and then to 4.8 work.

Comments?

By Mitchel Sellers @ Monday, January 28, 2008 5:55 PM
Joe,

I have noticed the same thing...

My guess is potentially a missing file in the installation package, or a conflicting DLL that is removed as part of the 4.6.2 process.

I have yet to be able to spend the needed time to actually diagnose the issue.

By Julio @ Thursday, February 07, 2008 2:43 PM
Please... my site is with problem after upgrade from 4.5.3 to 4.8.0

the log iis is with 302 error

the default.aspx is not load... can you help me?

By Mitchel Sellers @ Thursday, February 07, 2008 5:06 PM
Double check the values in your portalAlias table. If you have a trailing / at the end of the url, remove it.

By Francisco @ Sunday, February 10, 2008 11:22 PM
Hi,

I've upgraded from 4.5.5 to 4.8.0 and I get a "Value cannot be null. Parameter name: type" error. Any help about this?

TIA

By Mitchel Sellers @ Monday, February 11, 2008 4:24 AM
That is a hard one to diagnose...as I haev noticed multiple people with this issue at one time or another. The best overall guess that I have at the moment is that you could try an upgrade to 4.6.2 first, then go to 4.8

By Amit @ Tuesday, February 19, 2008 11:28 AM
I'm upgrading from 4.05.0 to 4.08.0 on clonned website.

I'm stuck with FriendlyUrl.

Heres what I did:

-back up old web.config
-unzip install pkg on dnn root folder
-rename release.config to web.config
-port all the settings from old web.config to new web.config
-even the section on friendlyUrl are matching

When building site I get following errors:

C:\souceCodeUg\source\<DNN_ROOT>\admin\Host\FriendlyUrls.ascx.vb(44,0): error BC30560: 'RewriterRuleCollection' is ambiguous in the namespace 'DotNetNuke.HttpModules.Config'.
C:\souceCodeUg\source\<DNN_ROOT>\admin\Host\FriendlyUrls.ascx.vb(91,0): error BC30560: 'RewriterRuleCollection' is ambiguous in the namespace 'DotNetNuke.HttpModules.Config'.
C:\souceCodeUg\source\<DNN_ROOT>\admin\Host\FriendlyUrls.ascx.vb(94,0): error BC30560: 'RewriterConfiguration' is ambiguous in the namespace 'DotNetNuke.HttpModules.Config'.
C:\souceCodeUg\source\<DNN_ROOT>\admin\Host\FriendlyUrls.ascx.vb(98,0): error BC30560: 'RewriterRuleCollection' is ambiguous in the namespace 'DotNetNuke.HttpModules.Config'.
C:\souceCodeUg\source\<DNN_ROOT>\admin\Host\FriendlyUrls.ascx.vb(113,0): error BC30560: 'RewriterConfiguration' is ambiguous in the namespace 'DotNetNuke.HttpModules.Config'.
C:\souceCodeUg\source\<DNN_ROOT>\admin\Host\FriendlyUrls.ascx.vb(116,0): error BC30560: 'RewriterConfiguration' is ambiguous in the namespace 'DotNetNuke.HttpModules.Config'.
C:\souceCodeUg\source\<DNN_ROOT>\admin\Host\FriendlyUrls.ascx.vb(122,0): error BC30560: 'RewriterConfiguration' is ambiguous in the namespace 'DotNetNuke.HttpModules.Config'.
C:\souceCodeUg\source\<DNN_ROOT>\admin\Host\FriendlyUrls.ascx.vb(200,0): error BC30560: 'RewriterRule' is ambiguous in the namespace 'DotNetNuke.HttpModules.Config'.
C:\souceCodeUg\source\<DNN_ROOT>\admin\Host\FriendlyUrls.ascx.vb(231,0): error BC30560: 'RewriterConfiguration' is ambiguous in the namespace 'DotNetNuke.HttpModules.Config'.
C:\souceCodeUg\source\<DNN_ROOT>\admin\Host\FriendlyUrls.ascx.vb(256,0): error BC30560: 'RewriterRule' is ambiguous in the namespace 'DotNetNuke.HttpModules.Config'.
C:\souceCodeUg\source\<DNN_ROOT>\admin\Host\FriendlyUrls.ascx.vb(264,0): error BC30560: 'RewriterConfiguration' is ambiguous in the namespace 'DotNetNuke.HttpModules.Config'.

By Moore Creative - cornelius, lake norman web design development @ Thursday, March 13, 2008 12:13 PM
Mitchel, fantastic articles, thanks! here's a quick update to add in... i was following the path to update from 4.4 to 4.8 by first updating to 4.6. That went well once I figured out that my hosting company had updated the SqlDataProvider with objectQualifier="DNN1"

---- BUT ----

in updating from 4.6.2 to 4.8.1 I had another error... it gave me a successful install after a couple of attempts, but then, only SOME of my portals were working! the main portal and three others were showing these common, inspecific errors:

Server Error in '/' Application.
Object reference not set to an instance of an object.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

I googled and found the answer finally from Ron Perry in the main dnn forums, here's the synopis I figured out:

1. any portal that was using the default blue dnn skin or containers was having this error... other portals with completely custom skins and containers did not have the problem UNTILL you tried to load an admin page. so it was skin/container related (?)

2. Ron Suggested that the dotnetnuke.config file in the root wasn't updated properly in the install/upgrade process (I checked and no new one is included in the 4.8.1 install/update package.

3. at the bottom of the dotnetnuke.config file (in the root with web.config) it was missing this code:

<skinningdefaults>
<skininfo folder="/DNN-Blue/" default="Horizontal Menu - Fixed Width.ascx" admindefault="Horizontal Menu - Fixed Width.ascx" />
<containerinfo folder="/DNN-Blue/" default="Image Header - Color Background.ascx" admindefault="Image Header - Color Background.ascx" />
</skinningdefaults>

Note: This code block should go inside the </configuration> section at the bototm of the file.

----------------------

once I put that code in, I browsed back to the site, and all the portals magically worked again!

By Déclic Vidéo @ Thursday, March 13, 2008 11:36 PM
Amit, have you solved your problem with Ventrian Friendly URL ?

Does anybody know if it is better to install 4.8.0 or 4.8.1 ??


DV

By Moore Creative - SEO Search Engine Marketing, Web Dev, CMS and more @ Saturday, April 19, 2008 8:48 PM
OH, one more item... with my shared hosting provider, there was another difference or two in their auto/generated web.config file...

not sure, actually if they made a difference or not, but noticed them and put them in just in case.

the <appSettings> in these cases also had three lines of machine key values to them. so i added them into the new web.config too.

By moore creative - dnn joomla ecommerce development @ Saturday, April 19, 2008 9:49 PM
sorry... should have posted these notes all together or amended previous notes... i have several DNN sites in mostly shared hosting environments, and have had to perform several updates individually... seems like each one has slightly different snafus when updating...

in one, to see what would happen, I tried going from 4.02 up to 4.8 in a new way... before I had gone up to 4.6 and then checked that it was workign... then started a second upgrade process to go up to 4.8.

this time, i installed all files for 4.6, and THEN installed all files for 4.8 and then finished the updates to start it working... it actually didn't go that badly, but there was a problem with extra files in teh bin folder that weren't needed and a few other problems...

these two articles helped out with thoes problems (mostly the result was teh "value cannot be null" problem that was reported earlier.

http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/107/postid/211595/scope/posts/Default.aspx

http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/-1/threadid/192812/scope/posts/Default.aspx

By moore creative - dnn joomla ecommerce development @ Saturday, April 19, 2008 9:51 PM
also these articles helped me in a test wehre i went up from 4.02 to 4.8 directly... bin problems and the value null issue that others reported

http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/-1/threadid/192812/scope/posts/Default.aspx

http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/107/postid/211595/scope/posts/Default.aspx

Click here to post a comment
 

 Add to Technorati Favorites
 Print   
 
  
 
ArchiveMinimize
 
 
 Print   
 
  
 
CategoriesMinimize
 
 
 Print   
 
  
 
DonateMinimize
 
 

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. 

 Print