This project is read-only.

Upgrading to BlogEngine.NET 2.5

File & Folder Changes

There are new files and folders in BlogEngine.NET 2.5, and some files/folders that existed in previous versions of BlogEngine.NET may no longer exist in BlogEngine.NET 2.5.  We've upgraded to ASP.NET 4.0 and there are several important updates that have been made to the web.config file.  BlogEngine.NET 2.5 is also making use of the new Razor technology for page markup.

Recommended Path to Upgrade

The cleanest way to upgrade to v2.5 is to start from a v2.5 installation, and then copy your existing data and settings into v2.5. The upgrade steps follow.

A couple of the steps are related specifically to those who use a database for storage, and a couple are related specifically to those who use the default XML storage (non-database). You can skip the steps that don't pertain to your method of storage.

1.  Backup

Make a full backup of your existing BlogEngine installation.  This is very important.  If anything goes wrong, you can always restore to your backup.

2.  Install v2.5

Install v2.5 on your computer, in a new folder.

3.  Web.config file (for non-database installations)

As noted above, because of the large number of changes to the web.config files, it is strongly recommended you use the web.config file that is included with v2.5.  If you have any custom settings in your existing web.config files (e.g. appSettings), it will probably be easiest to copy your custom settings into the BlogEngine.NET v2.5 web.config file.  If you have any custom settings, those can be copied into the v2.5 web.config file now.  Otherwise, you can just use the v2.5 web.config file as-is.

4.  Web.config file (for database installations)

If you will be using a Database for data storage, Web.config files you can use are located in the /setup/ folder.  Because of the large number of changes to the web.config files, it is strongly recommended you start from these sample web.config files, and copy your specific connection string into the sample web.config file.  For example, for SQL Server, in the /setup/SQLServer folder is a file named SQLServerWeb.Config.  For MySQL, the file is /setup/MySQL/MySQLWeb.Config, etc.  Copy this file to the blog root, delete the existing Web.config file in the blog root, and then rename this sample config file to Web.config (i.e. rename SQLServerWeb.Config to Web.Config).

At this point, the Web.config file you copied to the blog root and renamed contains a sample DB connection string.  The sample DB connection string will look similar to:

connectionString="Data Source=MySQLServer;User ID=user;Password=password;persist security info=False;initial catalog=BlogEngine;"

Replace this sample connection string with the connection string in your existing Web.config file.

If you have any other specific customizations to your existing Web.config file (e.g. appSettings), add those into this Web.config file.

5.  Database Upgrade Script (for database installations)

If you are using a Database to store your data in, you will need to run the DB upgrade script.  Each of the /setup folders has an upgrade script.  For SQL Server, it is MSSQLUpgradeFrom2.0to2.5.sql.  For MySQL, it is MySQLUpgradeFrom2.0To2.5.sql, etc.  Run this script in your existing DB.  If you are upgrading from a version prior to 2.0, you will need to first run the upgrade script(s) to get your DB up to v2.0.  For example, if you are upgrading from v1.6, you will need to first run the 1.6to2.0 script, and after that, run the 2.0to2.5 script.

6.  App_Data folder (for BOTH database and non-database installations)

In your v2.5 installation is the App_Data folder.  Delete all of the files and folders in the App_Data folder EXCEPT for the following 2 new items introduced in BlogEngine.NET 2.5.

  1. The blogs.xml file directly under App_Data.
  2. The blogs directory directly under App_Data.

Do not delete these two items.  Everything else can be safely deleted from the App_Data directory.  Once everything else has been deleted, the only 2 items remaining in the App_Data directory are those 2 items listed above.  Next, copy all of your App_Data contents (files/folders) from your existing blog to the App_Data folder.

Note:  This step should still be performed even if you are using a database since even with a database, the App_Data folder is still used for storing certain items such as files, images and some other small miscellaneous files.

7.  Theme folder, Robots.txt & Other Custom Files

If you have a custom theme, copy your custom theme folder into the v2.5 "themes" folder.  Similarly, if you have customized the robots.txt file, or if you have any other custom files/folders, copy those into the v2.5 folder you have been working on.

8.  Deploy to Web Server

Because you will have files on your web server that no longer exist (or have been moved) in v2.5, it is best to delete all of the BlogEngine.NET files and folders on your web server, and then upload the new v2.5 files and folders you prepared in the previous steps.

Please make sure you have a backup of everything you will delete (see step 1).

After you have deleted the BlogEngine.NET files/folder off your web server, upload the v2.5 files and folders you prepared in the previous steps.

9.  Check App_Data folder Write Permissions

If you deleted the App_Data folder in the previous deployment step, you may need to double check that Write permissions are still set on the new App_Data folder you uploaded.  Even if you are using the Database storage option, certain items such as files & images you include in your blog posts are still saved in the App_Data folder.  BlogEngine.NET can only save files in the App_Data folder if Write permissions are enabled for the ASP.NET account.

Multiple Blogs in Single Installation

BlogEngine.NET 2.5 introduces a new "multiple blogs" feature that allows you to create multiple blog instances within a single BlogEngine.NET installation.  If you will be running a single blog instance (which most people will be), there is nothing you need to do.  Even if you will run multiple blog instances, there is still probably nothing you need to do.  However, if you are using an existing custom theme, or using any custom extensions or widgets, those may need updates to be fully multiple-blog compatible.  Detailed information on this can be found at the link below.

Introducing Multiple Blogs in Single Instance for BlogEngine.NET

FAQs & Troubleshooting

You receive the following error message:

The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration

The likely cause for this is because your website is running ASP.NET 2.0 or 3.5.  BlogEngine.NET 2.5 requires your website run in an ASP.NET v4.0 application pool -- ideally in the Integrated mode pipeline, but Classic should work too.

Last edited Jun 19, 2011 at 11:53 PM by BenAmada, version 13


chickcove Mar 1, 2012 at 8:25 PM 
I've tried installing BE 2.5 in a virtual directory. But NO extensions are accessible. I've re-checked via FTP and all files are in place. Don't know what to do. Blog throws error msg:

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.

Source Error:

Line 130: {
Line 131: var settings =
Line 132: return
Line 133: }
Line 134: }

gespinosaf Feb 1, 2012 at 4:37 AM 
I installed the 2.5 version of at go daddy hosting service, an error appears. Are there any following step to do after the installation?

BenAmada Jul 25, 2011 at 9:44 AM 
cmmaung: You should not need to use BlogML. BlogML is useful when migrating posts from a non-BE platform to BE, or vice-versa. If you are upgrading from BE 2.0 to 2.5 for SQL Server, you will want to (a) run the upgrade DB script, and then (b) follow step 6 above related to the App_Data folder. Actually, you should just follow ALL of the steps above. Even if you are using a DB like SQL Server, the App_Data folder is still used to store images and a couple of other items in some cases ... most of the data (except for the images) will be stored in SQL Server -- images are not stored in the DB. You can see how in step 6 above, it says "Next, copy all of your App_Data contents (files/folders) from your existing blog to the App_Data folder." This is where you will be copying all of your images from your BE 2.0 App_Data folder to the BE 2.5 App_Data folder. Hope this helps. If you have any additional questions, the best place to ask those are in the Discussions here at CodePlex (the Discussions tab at the top).

cmmaung Jul 22, 2011 at 9:37 AM 
Now I just running on BE2.0 and want to update to 2.5. So I installed database for 2.5 on my local machine and download blogML.xml and upload to 2.5 from my local machine. It's okay. But I have no idea for images. How should I do? Cos 2.5 didn't use files folder in App_Data rite? So you may ask why not I download database backup from server, Cos sever sqlserver is more higher version than my local one. Thanks for your reply... I will wait :D

unteam Jul 12, 2011 at 10:22 AM 
Running IIS 6.0, I installed .NET 4.0 specifically for BlogEngine.NET 2.5. And got a continuous "Page Not Found." Turns out 2003 Server doesn't register .NET 4.0. Found this blog entry that fixed it...