Upgrading from BlogEngine.NET 1.1 to 1.3

Time to Move On

 I’ve been pretty happy with BlogEngine.NET 1.1 for the last ten months, but I don’t want to get too far behind, so I decided today to update to the current release, BlogEngine.NET 1.3.1. This procedure is specific to my installation, but it may give you some guidance on how to upgrade your installation. As background, my setup is as follows:

  • I run my own web server under Small Business Server 2003.
  • IIS is set up with all .NET 2.0 applications sharing an application pool called NET20AppPool.
  • I set up a new application for blogs called, uh, blogs. This maps to a virtual directory called inetpub\blogs.mycompany.
  • Inside the blogs.mycompany folder is a subfolder containing the actual blog application. I call this mark.

Getting Ready

I watched Al Nyveldt’s installation video for a helpful refresher on how to set up BlogEngine.NET. I decided to get the base install of version 1.3.1 working first, then to copy in the settings and posts from my previous installation.

Do the Upgrade

Follow these steps to upgrade from BlogEngine.NET 1.1 to 1.3.1:

  1. Download and unzip the web installation file. Rename the unzipped folder to mark.
  2. In IIS, stop the blogs application and the DOTNET20AppPool.
  3. In Windows Explorer, under inetpub\blogs.mycompany:
    1. Rename mark to mark.old.
    2. Move the unzipped mark folder to inetpub\blogs.mycompany folder.
    3. Remove any existing permissions from mark. Go to Advanced to inherit permissions from inetpub\blogs.mycompany.
    4. Go to the App_Data folder and give NETWORK SERVICE Modify permission. (I have NET20AppPool set up to use the NETWORK SERVICE account.)
    5. Edit mark\robots.txt to point to the correct path.
    6. In the App_Data folder, copy settings.xml to settings.orig.1.3.1.xml.
    7. In the old App_Data folder, use Microsoft Word or SourceSafe to display the differences between Settings.orig.1.1.xml and Settings.xml. In the new App_Data folder, make the corresponding changes to Settings.xml.
    8. In the new App_Data folder, delete the contents of the log, pages, and posts folders.
    9. Copy the following files and folders from old App_Data folder to the new App_Data folder, overwriting when necessary:   blogroll.xml categories.xml roles.xml (wasn’t present in 1.1 but probably need to copy when upgrading past 1.3.1) users.xml files\*.* log\*.* pages\*.* posts\*.*
    10. Copy the old themes\mytheme folder to the new themes folder.
  4. In IIS, start the DOTNET20AppPool and the blogs application.
  5. Open the blog in a browser.

Test and Debug

When opening the blog in a browser, you may encounter errors if underlying technology has changed. Check the server’s event log if you get an error. On this update, I found that Utils.SafeMail was no longer there. So in mytheme\sidepanel.ascx, I copied in the new alternative (which uses a contact form) from the Standard theme. The required contact.aspx form was already there; I edited it to put the labels and fields in a table for a nicer look. I also edited RecentPosts.cs to add a space before the Comments and Ratings labels to keep them from running together. You should check the Control Panel > Settings tab to see if there are new settings that you want to configure. I chose to uncheck Enable post ratings for now. I also changed the avatar processor from Combination back to Gravatar. This got rid of the colorful but squirrelly icons that must be coming from Monster when the person has no avatar. By the way, I initially formatted the above procedure in FrontPage 2003, complete with a, b, c, d, etc. for the sub-points. This created an <ol type=”a”> tag. For some reason, BlogEngine.NET strips out the type attribute when I paste in the HTML, leaving incorrect sub-point numbering. No fix for that now. Update: after converting to WordPress, even without the type=”a” in the <ol>  tag, the nested list is numbered with a, b, c, etc.–no doubt based on the CSS style sheet of the active theme.

Fix the Theme

I wound up having to re-do most of my theme modifications, which weren’t too extensive:

  1. Copy the contents of the current themes\Standard folder to the themes\mytheme.
  2. In site.master, add my “customized by” note to the footer.
  3. In sidepanel.ascx, copy in the previous About Me table. (See the note above about using the new contact form instead of Utils.SafeMail.) Remove a few sections I don’t use (Calendar etc.). Make the Archive header a hyperlink to the new archive.aspx page. Copy in the previous Disclaimer text.
  4. Modify style.css to use the colors used in the old version. (There are lots of new styles, so you can’t just use the old version.) Add the following styles to the Side Panel section to handle a hyperlink (now that the Archive header is a hyperlink): #sidepanel .box h1 a { color: #999999; text-decoration: none; } #sidepanel .box h1 a:hover { text-decoration: underline; color: #003399; }

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.