May 0916

Upgrading to BlogEngine.Net 1.5

I have just updated to the latest release of BlogEngine.Net, if you take a look down in my footer you’ll see I’m now using 1.5.0.7 and I just wanted to share my experience.

For the most part the upgrade process was pretty simple, I was upgrading from 1.4.5 and have a local copy to play with before pushing my changes to the live server. I have my site safely stored in an SVN repository so if something should go wrong I could simply restore the last version, so that’s my initial step taken care of.

  1. Unzip the latest version to a folder (somewhere handy – I used my desktop) and then unset the read-only properties (including subfolders and files).
  2. Upgrade the database schema. I’m using SQL Server for my data storage, I know BlogEngine works out-the-box with xml but I don’t trust xml, I don’t like xml for data storage (especially when I can use a database) and I used to be a DBA so have a relationship with databases Tongue out. In the Setup folder are folders for the various databases that are supported and in the SQL Server folder is an upgrade sql script (MSSQLUpgradeTo1.5.0.0From1.4.5.0) that just modifies the be_PostComment table adding a new ParentCommentID column.
    Also in the folder is a new SQLServerWeb.config file to replace your current web.config file. There are a few changes in there but as I have made quite a few changes to my web.config file I wasn’t about to just replace my version and hope I remembered what changes I have made. So opened up WinMerge to merge the changes into my version, there were only a few lines so that was pretty painless.
  3. Update the files - A simple wipe out all my files and start again wasn’t going to cut it for me – I’ve modified quite a few of the files to achieve the look I want, for example I don’t like the layout approach used on contact.aspx and I’ve also made other modifications to the way the menu is generated. Once again WinMerge to the rescue by getting it to compare folders I could easily see the differences between the new file versions and my own copies. With these changes made I fired up my web browser and checked the site on my localhost – success, hurrah.
    See told you it was easy!
  4. Upload the new version – I was feeling pretty confident at this point, I’d made all my changes without breaking anything, no layout craziness, no YSOD’s just a nice feeling. So I opened up my FTP client, dutifully made a full back up of my live site, exported the latest version of my website from its repository and uploaded that to my live server. While that was going on I also made the change to the database. After a few minutes all the files were transferred ok, so I opened up my browser and… boom YSOD. WTF?
  5. Troubleshooting -  Yikes, I really didn’t expect to be here after all I’d tested this on my localhost and it all worked OK.
    1. I checked the Live database to make sure the new column existed which it did.
    2. Next I changed the customErrors mode to Off so I could see what was actually happening. Yes I know not advised on a live site, but it was working locally so I had to see what was causing the error.
    3. My errors were to do with methods being called with the wrong number of parameters from some of the extensions. Ok I’ll upload those again and make sure they’re really on the live server by checking file sizes and try again. Still getting a YSOD…
    4. Ahaah – looking at my local (SVN exported) copy of the site I noticed a folder was missing, can you guess which one…?
      The bin directory! Of course, the bin directory isn’t included in the repository by default as it can usually be regenerated from the code. Fortunately I still had my local copy of the site handy and quickly uploaded the bin, retested my site and, after a short recompiling delay… it was back.

Hopefully you didn’t get caught out like me, enjoy the new 1.5 release!

Permalink | Comments (0)
Comments are closed