Ok, so previously I have upgraded my project files and solutions from Visual Studio 2003 to 2008, and have upgraded to master pages. I wrote about this in an earlier post: http://stgaup.blogspot.com/2010/02/upgrading-episerver-to-masterpages.html.
So now the next step. Upgrading the EPiServer version from 4.51 to 4.62B.
Since I am going to upgrade at least 2 sites, and someone in IT Operations needs to do the same upgrade on the production systems, I thought it would be a good idea to create an offline install. I had to google a bit and eventually fond out that to create an offline package, you need to:
- Start EPiServer Manager
- On the Tools menu, select “Create offline installation…”
- Click Next
- Select “Upgrade”
- Select From version in my case 4.51)
- Select To Version (4.62B)
- Specify directory where the package should be created.
- Click “Create”.
I had no problems with this part of the job.
Next I had to do the upgrade:
- Backup all files and the EPiServer database.
- Right-click the web site to upgrade in the EPiServer Manager, and select “Upgrade…”.
- Click Next.
- Select “Offline” and then browse to the package created before.
- Click Next.
- Review upgrade info, then click “Upgrade”.
The next thing happening was that the upgrade was being done, and the progress bar was showing some progress, until about 20% on the way. Then I got an error message: “Failed to register ASP.NET client scripts on this site”
It turns out that the EPiServer Manager is not able to install when there are versions of the .NET Framework installed after version 2.0. So the dirty trick you need to do is to remove the 3.0 and 3.5 folders from the WINDOWS\Microsoft .NET\Framework folder because EPiServer Manager will try to locate aspnet_regiis.exe (and maybe other command line utilities) in those folders, and it’s not there. This thread was helpful: http://world.episerver.com/Templates/Forum/Pages/Thread.aspx?id=17376&epslanguage=en.
Ok, so after I had moved those folders, it seemed that the upgrade worked, until I tried to browse the web:
EPiServer 4.62.0.533 can only be used with database version 100, current version is 90. Make sure both database and assemblies are upgraded correctly.
I didn’t get any errors while upgrading. Everything seemed to go well, but it didn’t. The EPiServer Manager failed to upgrade the database.
I am assuming at this point that the database upgrade failed because the web was using Windows Integrated security with SQL Server. I thought it could work because I had made sure that my windows user account had owner rights to the database, but sadly it failed.
Tip: Don’t use Windows Integrated Security with EPiServer (when upgrading) even though Microsoft recommends that as the most secure way of accessing SQL Server. If you do, you will (probably) need to set up your site with impersonation, and turn off anonymous access.
Ok, so then I tried to run the upgrade once more after setting a SQL Server username/password. I then got the message:
The site is already up to date (4.62.0.533) – no new versions available.
So now time for my next dirty trick, one that I have used before, which is to copy the old EPiServer.dll back into the bin folder of the web site. (Of course I had a backup.)
So new upgrade attempt. First had to restart the EPiServer Manager, because it still thoght the web was version 4.62B. After restarting it said 4.51, as I intended it to.
This time the upgrade worked as it should, and the web is up and runnig again, now og EPiServer 4.62B.
IMPORTANT: Copy back the .NET 3.0 and 3.5 Framwork files to their correct location!
NEXT STEP: Upgrade to CMS 5? Am I brave enough?