09 March 2010

Crystaltech to 3essentials DNN copy

PHDCC Director John Cant describes the process of transferring a DNN site from one shared host to another, at this stage simply as a backup using a different/private domain.

The site, ourdnnsite.com is being copied from Newtek (Crystaltech) hosting to 3Essentials with domain ourdnnsite.info. Both support services are very helpful but it currently seems that 3essentials runs faster than Crystaltech, probably because of a faster database server.

The existing site runs only one portal but this contains many users and many files in /Portals/0/. Maintaining the UserIDs is crucial as much custom information in the database is keyed off this value.

Enable ASP.NET 3.5 at the 3essentials site.

First, place a holding page at ourdnnsite.info, eg index.html, that will be shown instead of Default.aspx for people accessing the root domain URL.

Make sure to truncate transaction log prior to the upgrade, clear the eventlog and maybe even sitelog and search tables, if those are exaggeratingly large.

The 3essentials site currently runs SQL Server 2005/2003. They need a .BAK backup file so that the database copy can be restored correctly.

Do a database backup on the Crystaltech site and ask for the entire site to be zipped, to get these files:

  • ourdnnsitedb_1002050754.bak
  • ourdnnsite.zip

Load these to the 3essentials site ourdnnsite.info /private/

Submit a 3essentials site support request, asking for:

  • the database to be restored from /private/ourdnnsitedb_1002050754.bak
  • the site files to be unzipped from /private/ourdnnsite.zip
  • the site file permissions to be set correctly:
    "I have corrected this issue, this involves giving the httpdocs directory IWPD User - Modify permissions which you are not able to do via Plesk."

Check the Web.Config file at the 3essentials site:

  • set the new database connection string twice
  • check the ObjectQualifier
  • set CustomErrors to 'Off' to see the errors
  • ensure the machinekey values are the same as the original values from the Crystaltech site
  • set AutoUpgrade off

On the database:

  • Update the portal alias, eg:
    UPDATE [DNN_PortalAlias] SET
    HTTPAlias='www.ourdnnsite.info' WHERE PortalAliasID=0

Access the site by visiting Default.aspx

If any errors are visible, keep deleting the sections of Web.Config that cause errors.

If you cannot log in, use Chris' technique, described here. To access the DNN database, log in using myLittleAdmin here: http://db1.3essentials.com/mla/

To prevent unauthorised access to the ourdnnsite.info site, add to the Default.aspx file a check that a cookie is set. Provide a means of setting the cookie using another private page.

There are a couple of other additions that we usually make:

  • As well as creating an app_offline.htm file, we use the Cookie technique in Default.aspx to ensure that the site is offline during maintenance, redirecting to an offline page.
  • In the skin, we warn people who are online that the site is about to go down; this also helps us see if anyone is online now.

More details on these Default.aspx techniques later if you wish.

No comments: