Monday, July 10, 2006

DotNetNuke (DNN) Error "Invalid attempt to read when no data is present"

When upgrading from 4.3.1 to 4.3.2 I encountered the above error. A few posts in the DNN Forums suggested there were problems with the portals defined. In my case, I had one portal defined with id of zero (0) yet there was also a portal id one (1) called “My Website” with most other columns null. I started the 4.x journey with 4.0.2 and checking there I found only one row in Portals. So....perhaps the upgrade to 4.3.1 did something? Anyway, I had just tried my cookbook approach to upgrading posted about here so I simply deleted the database, recopied, fixed the aliases then deleted the spurious row. When I first hit the site it ran through the upgrade perfectly then I clicked the link at the bottom of the upgrade report page and was “in like Flynn”.

Original post

How to upgrade a DotNetNuke (DNN) site

I've got a pretty simple “cookbook” way to upgrade (or test upgrade) a DNN site which I thought I'd share. I'm using 4.x which means SQL Server 2005 and VS.NET 2005.

  1. Unzip the download to a new directory
  2. Make the new directory a virtual web share
  3. Copy/paste either development.config or release.config and rename to web.config
  4. Compare the old web.config to the new web.config (using a tool like WinMerge) and copy over the database connection string (edit to use new database name from step #5) and machine key.
  5. Copy the database - while only SQL Server needs to be running to use the site, to take advantage of the new copy database feature you must have SQL Server Agent and SQL Server Integration Services running.
  6. Open the Portal Alias table and fix up the URLs to match the new directory setup in step #2.
  7. Fire up a browser and hit the new URL - upgrade should kick off automatically and leave you with a link to the home page.

Now go cut the grass or whatever chores you've been putting off.

Original post