BlogEngine.NET 1.4 Upgrade Guide

-   Jun 30, 2008 -   BlogEngine.NET -   , ,

100_5087 This was fairly popular last time around, so I wanted to write this up and make sure it was available right away with the new 1.4 release.  The upgrade process is fairly easy but there are a few things to be aware of.  Hopefully, I’ll cover everything you could possible want to know on your journey from BlogEngine.NET 1.3.x to BlogEngine.NET 1.4.

1. Backup your stuff

If you read this last time, you realize that there is no warranty with my guide and you are strongly encouraged to backup your blog and blog data.

At a minimum, please backup your App_Data folder, any custom themes or extensions you may have, and your web.config especially if you are a database user.

2. Download BlogEngine.NET 1.4 (website)

This is likely the step you have already done.  (If not, get it here.)  Once you have it located on your PC, unzip it.  Right click the folder, go to Properties and remove the Read Only check.  (This step has helped some and has never hurt anyone.)

3. Update your database

If you are using the the MSSQL Provider and have your blog data stored in SQL Server, we have an upgrade script for you to run.  It adds a few more tables and some basic data for them.  The script is found in the Setup folder of the blog and it is labeled MSSQLUpgrade1.4.0.0.sql.  Run this against your BlogEngine database.

4. Configuration… as in Web.Config

If you are a database user, you are going to have to make some updates to the web.config that you are about to upload.

First thing, you will want to add your connection string to the new web.config in the connectionStrings section.

Second, you will notice that the MSSQLBlogProvider is gone.  (Its ok.  It has gone to a better place.)  It has been replaced with the DbBlogProvider.  This is your new friend.  Make sure you have your connection string name marked here and set the DbBlogProvider as your default BlogProvider.  Save your changes.

Capture2 

5. Upload your files

This is a little bit tricker this time around so pay attention.

First, make sure you have a good backup from step #1.  This is really your last chance to do that.

Now, you can upload everything except the App_Data folder.  It is important to note that a few things have moved around and if you just choose to overwrite files, you’ll have some left overs.  These leftovers should not cause problems for you (except noted in the troubleshooting section) but they just take up space, most notably the tiny_mce folder under the admin folder has been moved and can be deleted.

Once you have most files moved up, it is time to go into your app_data folder.  In the downloaded project, you will see two new folders, datastore and profiles.  Upload these to your site as well.  (If you use a database for file storage, it isn’t require, but it is consistent.)

6. Security Update

If you use the default XMLMembership provider to store your passwords, this has been updated in in 1.4.  We had been storing the password in clear text and this is no longer the default.  If you wish to continue with clear text, you can set your XMLMembershipProvider passwordFormat to Clear in the web.config, but this is not recommended.

Since BlogEngine.NET 1.4 is looking for hashed passwords by default, you’ll be unable to log in unless we make a change to your user data.  You’ll need to retrieve your users.xml file from your app_data folder.  You should be able to see your users and passwords listed in the file.  Remove the password from each entry user so it has an blank or empty password and save the file.  Upload your newly edited file to your site when you are done.

Capture

This will cause BlogEngine to allow you to log in with each user using the password “admin” so that you can then change the password to whatever you’d like.  The new password will be hashed.

7. Fire it up

Ok, now that we have everything out there, let’s run it.  Point your browser back to your blog and after a few moment wait as your site compiles, you should see your blog back as you’d expect it.  (If your blog doesn’t come up, see the troubleshooting section below.)

Now that you are up, first log in and use the change password option on your admin menu to change your password to something secure.

8. Check your settings

Everything is done, but it is always a good idea to Check your settings and make sure everything is configured properly.  This would also be a great time to fill in your profile for FOAF support.

Troubleshooting

Hopefully, you are just reading this because you want to see what other poor souls are struggling with.  The typical things that are going to cause trouble are custom themes and extension that were made prior to 1.4.  If you have any installed remove them and try again.  If you are still having trouble, try going into your settings.xml or be_Settings table and changing the default theme to be Standard.

If you are having trouble logging in to your blog, try an application restart.

If you have more tips or additions, please make them in the comments and I’ll update this post.

28 Comments

MarkG
Commented on 7/3/2008 3:17:52 AM
I use SQL Server for membership and roles and the XMLBlog provider for blog posts. I'm pretty new to BlogEngine.NET, but these instructions were spot-on and helpful. I was back in the game within an hour and everything seems fine.

Thanks much for your effort and contributions!
mikedopp
Commented on 7/3/2008 3:18:48 AM
Al,
Congrats on the update. I will be updating later. thanks for all the hard work.
~mikedopp
ReSon
Commented on 7/3/2008 4:50:20 AM
Congrats to the dev team on this!  I just impletemented 1.3 on my site last night, and earlier today I was going through themes and extensions that i wanted to utilize.  Now I'm torn on if I should move to 1.4.  Do we know if the NonZero theme works on 1.4?  Along the same lines, I'm guessing a lot of extensions will either be re-written for 1.4 and/or compatibility tested for 1.4 and update the site.  

I guess I can start testing a few out and noting them Smile

Again, great job guys!
Muhammad Sajid
Commented on 7/3/2008 9:32:02 AM
nice article. but still [b]smtp password [/b]is in plain text. kindly encrypt it as well.. this is a security issue.
Necat Bolpaça
Commented on 7/3/2008 2:20:34 PM
I upgraded my blog to 1.4 today. Thanks to development team.

But i didnt understand what hash method in the users.xml file.

md5, sha1 or salt md5(md5()) ?

Have i use the XmlMemberShipProvider's CreateUser method?

Thanks.
Leigh
Commented on 7/3/2008 3:40:04 PM
Cheers,

I will sort out my site with an upgrade later today (I hope). Laughing
mikedopp
Commented on 7/3/2008 5:35:25 PM
dang it the palaam theme is broken.
Steve
Commented on 7/3/2008 11:21:03 PM
thanks for the update.

however, the [more] tag is no longer working.
Steve
Commented on 7/4/2008 12:19:20 AM
i thought i followed all the directions but i did something wrong. i keep getting 'object not set to reference' errors.
µilad
Commented on 7/4/2008 4:01:57 AM
Hi Al!
I wanted to know how can I move my posts and pages from 1.1 version to this new version. I tried to do it when you released 1.2 and 1.3 but I couldn't do it.
please help me Smile
thanks ...
Janko
Commented on 7/5/2008 2:37:29 AM
Nice to have guidelines like this. thanks!!
Kris Burgess
Commented on 7/5/2008 5:58:56 AM
Thanks for the guide; its clear and to the point.

I've started to customise mine to include specific web reporting etc that we needed but thankfully no changes required to migrate.

PS - think there is a typo - "leftovers should cause problems for you "
guessing should say "shouldn't"?? Only mention because it might scare people!!
Al Nyveldt
Commented on 7/5/2008 6:01:31 AM
Thanks Kris.  

I made the correction.
Albérico
Commented on 7/5/2008 11:19:50 AM
I'm getting an error message. Do you have any ideia about this exception?

[SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
sandeep verma
Commented on 7/6/2008 4:24:28 AM
HI Al,

i want to integrate blogengine inside my site, so that user dont need to login separately for the blogengine, and it should be customised with the site design. I am using SQl-server2005 as database.
Could you please help me on this.

Thanks
Sandeep Verma
sandeep verma
Commented on 7/6/2008 4:41:01 AM
Hi Al,

This is Sandeep again, one more thing i want to ask you is that i couldnot find create post functionality in the blogengine. Could you please help me to make it available.

Thanks
Sandeep Verma
Mehmet Gündöner
Commented on 7/6/2008 10:58:51 PM
Hi Al;
Thanks for all your info on update progress but would you please video the information. Because a visual handbook would be worth understand for foreign users like me.
Josh Philpott
Commented on 7/7/2008 7:23:14 AM
I just upgraded my site to BE 1.4 and I'm having a bit of a problem.  The page shows up and after I log in the only option I have under the Admin area is change password.  I have followed the steps in the set up guide.  Any help would be greatly appreciated!
Josh Philpott
Commented on 7/7/2008 10:27:27 AM
Problem solved.  I had to recreate the Admin user and then recreate my personal user!
Wayne
Commented on 7/15/2008 8:24:25 AM
Thanks for the guide, it came in handy.  One thing I just found, and I'm not sure if it is my own fault yet, or the upgrade (lacking time right now), but there doesn't seem to be any way to edit the single, administrative users password to a new one..  Anyone else see this too?

It's probably me, but wanted to see if I wasn't the only one.
Janko
Commented on 7/17/2008 12:26:01 PM
Al, I upgraded to 1.4 but somehow I lost all the extensions. Extension admin page is empty and of course none of the extensions are processed (no bbcode, no smileys)... Did I miss something?
Chris
Commented on 7/21/2008 8:40:17 PM
My upgrade didn't go very well so had to back down.

I tried a fresh local install and the edit on the user grid is missing.  Also, if I create a user I'm not able to log in using the password, if I blank out the password in the XML file then I can log in using PWD admin but it seems like the hash isn't working properly.
pradeep kumar mishra
Commented on 7/23/2008 3:50:05 AM
I am getting following error and still not able to find a solution. Everything was working fine on local but when I moved to shared hosting solution (They provide medium/high trust) I started getting the following error at the very first place

Security Exception
Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   System.Runtime.Serialization.Formatters.Binary.ObjectReader.CheckSecurity(ParseRecord pr) +2803612
   System.Runtime.Serialization.Formatters.Binary.ObjectReader.ParseObject(ParseRecord pr) +251
   System.Runtime.Serialization.Formatters.Binary.ObjectReader.Parse(ParseRecord pr) +64
   System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record) +1031
   System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum binaryHeaderEnum) +62
   System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run() +145
   System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) +183
   System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) +190
   System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream) +12
   BlogEngine.Core.DataStore.XMLDocumentBehavior.GetSettings(ExtensionType exType, String exId) +336
   BlogEngine.Core.DataStore.SettingsBase.GetSettings() +41
   Controls.WidgetZone.RetrieveXml() +82
   Controls.WidgetZone..cctor() +6

Rands
Commented on 7/23/2008 11:15:45 PM
Hi,

I upgraded my blog from 1.3.1 to 1.4 following the steps mentioned in the post. I have not been successful with the upgrade as I am getting a run time error.

Please help
sathish
Commented on 7/26/2008 5:02:42 AM
hi,

How to integrate blogengine.net into my solution, can any one give me detail description,
David Henderson
Commented on 7/28/2008 9:56:27 AM
I upgrade a 1.3.0 site per these instrcutions and am seeing the following exception when I try to open the site:

System.Web.HttpException: This application was precompiled with personalization turned off, but it appears to have been turned on after the precompilation, which is not supported.
Heather Floyd
Commented on 7/31/2008 2:32:16 AM
Upgrading from 1.3 to 1.4 was a nightmare! It didn't recognize any of my post files, and I had to do a ton of cut and paste to re-create all my posts. Argh. I wouldn't have upgraded if I knew it would be such a problem!
Heather Floyd
Commented on 7/31/2008 2:45:57 AM
Specifically the posts it had problems with were ones with comments. It seemed to screw up the xml.
Comments are closed