Tool to assist during upgrade of EPiServer CMS

EPiServer Deployment Center is used to upgrade from one EPiServer CMS version to another. It copies new files to your www root folder, it changes configuration files, it upgrades the database schema and finally executes some tasks by starting an application domain using the configuration files and binaries in your www root and executing them in this context.

I think this last step is the most common cause of problems when upgrading an EPiServer CMS solution in production. Maybe you can not start the site between after you have upgraded to from 5R2 to 6R2 because you have compiled you new version for 6R2 (or maybe even 7)?

Completed with errors – Missing XForms and other issues

You might get an error in the upgrade log indicating that Upgrade-EPiXForms or Upgrade-EPiXFormNames failed. Or maybe your team decided to upgrade the EPiserver CMS database just by using the SQL update scripts and later your find out that all XForms are missing. These are two examples when the last step in the upgrade process failed or was not executed.

It can take 4 hours to upgrade XForms if you have around a million XForm posts stored in the database.

A Tool to manually execute upgrade tasks FOR EPiServer CMS

clip_image002[5]

Paul Smith has blogged about one workaround to Upgrade-EPiXFormNames. It solves the problem by executing the same code inside your web site instead of relying on EPiServer Deployment Center to do it.

I have extracted all of these special tasks that are executed inside the context of the web application in EPiServer Deployment Center into a plugin so you can execute the steps later much easier.

[DOWNLOAD HERE]

Using this plugin enables you to:

  • Complete the upgrade of XForms later so you do not have to wait for hours on EPiServer Deployment Center if you have many forms.
  • Upgrade directly from EPiServer 5 R2 to EPiServer 6 R2 (possibly also EPiServer CMS 7) without compiling for EPiServer CMS 6 R1.
  • Upgrade a production database without using EPiServer Deployment Center.

Upgrading EPISERVER database without using deployment center

Follow these steps if you want to upgrade a database directly form EPiServer CMS 5 R2 to EPiServer CMS 6 R2 Hotfix 2!

  • Verify that EPiServer Deployment Center for EPiServer 5R2, 6R1 and 6R2 is installed on each production webserver. (This is needed to get all assemblies installed in the GAC and get the latest EPiServer services.)
  • Double check that it is EPiServer 6 R2 with Hotfix 2 that you have installed if it is already present on the server. The version number of EPiServer.dll in C:\Program Files (x86)\EPiServer\CMS\6.1.379.0\bin should be 6.1.379.502.
  • Upgrade the production database from EPiServer 5R2 to 6R2 Hotfix 2 by running the following SQL scripts for EPiServer CMS and EPiServer Framework in correct order.

    clip_image002
    You will find the scripts in the following three folders:
    C:\Program Files (x86)\EPiServer\Framework\6.2.267.1\Database\sql
    C:\Program Files (x86)\EPiServer\CMS\6.1.379.0\Upgrade\Database\sql
    C:\Program Files (x86)\EPiServer\Framework\6.2.267.1\Upgrade\Database\sql

  • Update the web application
    • Make sure the site has EPiServer.dll version 6.1.379.502
    • Verify that your new configuration files from your build server are updated with correct assembly bindings to this version
    • Verify that your Connection String points to the upgraded database
    • Finally, verify that the web application starts!
  • Drop the file Avantime.Upgrade5To6Tool.dll in the bin folder of the upgraded site. [DOWNLOAD HERE]
  • Go to Admin Mode
  • Click Config > EPiServer Upgrade Tool
  • Run each of the jobs.
    • Each job is executed on a separate thread so refresh the log to see the progress.
    • It is normal that some xform upgrades fails. You can rerun the XForm upgrade several times if it is aborted.
    • Disable logging if you have a lot of data. The log is stored in memory.
  • Remove Avantime.Upgrade5To6Tool.dll when finished.