In addition to moving this blog to
BlogEngine.NET (BE) I've recently moved my personal home blog from
dasBlog to BE and I’ve had to lookup the steps to export/import blog data more than once so I decided to capture them once and for all here. The process shouldn’t really take more then about 30 minutes to complete.
- Download Paul Van Brenk’s dasBlog BlogML importer
- Run the importer to convert your dasBlog content to BlogML. I ran into a few issues trying to import 1500+ comments from my blog so it required a bit of debugging/tweaking.
- Download BlogEngine.NET and set it up either locally on an ISP (importing can work with either)
- To avoid a Username/Password error upon importing into BlogEngine.NET add the line indicated below to BlogEngine.NET\api\BlogImporter.asmx (solution originally sourced from this work item on CodePlex)
[SoapHeader("AuthenticationHeader")]
[WebMethod]
public string AddPost(ImportPost import, string previousUrl, bool removeDuplicate) {
if (!IsAuthenticated())
throw new InvalidOperationException("Wrong credentials");
...snip...
Post post = new Post();
post.Title = import.Title;
post.Author = import.Author;
post.DateCreated = import.PostDate;
post.DateModified = import.PostDate; // or "DateTime.Now" <- LINE ADDED
post.Content = import.Content;
- Log into your BE install click on the Settings tab and scroll all the way to the bottom to view the Import & Export section.
- Click the Import button which launches the Blog Importer tool that looks like this:
- Enter the name of your BlogML XML file, the URL to your BE blog and your credentials
- Click Import
- Hit your BE blog and enjoy your imported data!
Btw, here is a post to a few other items I had to address to really get my blog moved over.
While I updated my blog awhile ago I thought I post an update as to how my conversion when and mention a few of the things I had to do to convert. BlogEngine.NET (BE) has been a refreshing break from dasBlog and the ASP.NET v2.0 design of BE is so much more enjoyable to work with. Porting my theme was a no brainer and while I had several hurdles in order to actually move it has been well work the effort.
For example, my blog now loads much faster, pages are now compressed, and login problems are a thing of the past among many other benefits. Some of the issues I faced in the move included:
- Moving my posts and comments
- Preserving the dasBlog style title-based links to my posts
- Preserving non-post articles I’d written
- Porting dasBlog’s macro for quickly linking text to a BE Extension
I first tried using a dasBlog provider but eventually decided against that approach as it would have prolonged the aforementioned comment loss issue. Eventually, I settled on a minor change to the slug (URL) handling for BE coupled with a dasBlog URL rewriter which handles various redirects and any referrer related issues as I find them. Additionally, I added the blocked IP logic from dasBlog to BE allowing me to cut down on spam attacks (at least a little).