Category Archives: Blogging

Moving from dasBlog to BlogEngine.NET

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.

  1. Download Paul Van Brenk’s dasBlog BlogML importer
  2. 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.
  3. Download BlogEngine.NET and set it up either locally on an ISP (importing can work with either)
  4. 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)
    public string AddPost(ImportPost import, string previousUrl, bool removeDuplicate) {
        if (!IsAuthenticated())
            throw new InvalidOperationException("Wrong credentials");
        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;
  5. Log into your BE install click on the Settings tab and scroll all the way to the bottom to view the Import & Export section.
  6. Click the Import button which launches the Blog Importer tool that looks like this:


  7. Enter the name of your BlogML XML file, the URL to your BE blog and your credentials
  8. Click Import
  9. 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.

Update on my switch to BlogEngine.NET

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).

Building my blog Part IV: Creating a theme for dasBlog

Like many people I wanted to add my own personal touch to my blog and creating a theme was high on my list. My first task was finding a simple CSS based layout that included the typical three columns, header and footer. Back in August of 2004, I blogged about a three column layout I’d created and thought it only appropriate to put it to real world use so if you reading this from my website the layout is pretty much the same one I posted two and a half years ago.

DasBlog is very easy to theme and you can use any HTML as your site template which provides a huge amount of flexibility not to mention it includes over 20 themes so there are lots of starting points. To create a new theme you’ll need to do the following:

  • Create a new directory under the dasBlog’s themes directory
  • Copy the files of an existing theme into the new directory
  • Tweak the various CSS and *.blogtemplate files to your liking
  • Edit SiteConfig\site.config and change the <theme> tag to the name of the directory you created above
  • Edit themes\yourthemename\theme.manifest and set the attributes of the <theme> tag accordingly.

I used some of the files from a theme called “dasblog” primarily because it has dasblog.css which defines CSS classes for all of the elements used in dasBlog which is a real time saver. Along with the HTML markup a dasBlog theme template contains macros which at runtime, render the various blog elements and appear like the following in your template:


This particular macro renders the Search box in the upper right corner of my blog. Do worry though even though it’s an ASP.NET application you really won’t need ASP.NET experience to create your own theme. Another nice thing is that I’ve yet to run into a macro that doesn’t allow for theming.

Where to get theme ideas

There are lots of resources on the web related to design, here a few that I look at for ideas:

If there is interest I’ll make my site design available just let me know.

Reference: Part I, Part II, Part III

Update: Fixed Part III URL

Building my blog Part III: Download and setup

After figuring out which blog engine to use the next step was to get it running locally. I’d never recommend trying to run your blog directly on your ISP before running locally where you’ve tested it out and your comfortable with it. If you struggle to get it running locally my guess is those problems will only multiple when you move it to your ISP. If you’re concerned about setting up and configuring a local SQL server on your machine that’s all the more reason to go with something like dasBlog which uses XML files.


DasBlog requires two things, the .NET framework and IIS. Microsoft’s $g(Cassini web server) isn’t really a great option because at runtime dasBlog adds full URLs for the stylesheet references and thus Cassini can’t supply them so your site renders without its theme. There is lot’s of information on $g(getting IIS installed) on the web so I won’t spend time covering that. Regarding the .NET framework you can use either 1.1 or 2.0 since both are supported although I’d recommend using ASP.NET 2.0.

Download and setup

The dasBlog download available from SourceForge comes in two flavors, with or without source. Since I don’t have plans, at least at this point, to dive into the source code I went for the “Web Files” link which contains only the necessary files for deployment. Once downloaded I unzipped the contents into a dasblog directory and checked out the readme which has detailed information about installation and a few necessary configuration file changes. If you’re using ASP.NET 2.0 there are a few changes you’ll need to make to the web.config file which are explained in the readme. Once everything was configured I fired up the browser, hit the URL and my new blog engine popped right up. Next time, I’ll talk about how I created the theme for my blog.

Reference: Part I, Part II

Building my blog Part II: Selecting blog software

First, I’ll admit I got a bit ahead of myself in Part I since by the time I selected an ISP I’d already downloaded and setup dasBlog before making the commitment to hosting my own blog. Anyway…

Since my day job involves building an ASP.NET designer using a blog engine running on something other than ASP.NET wasn’t really an option. However, as far as blog engines go I’ve either used or I’m currently using the following blog software:

  • WordPress
  • Google’s Blogger
  • .Text by Scott Watermasysk whose long since moved on to Community Server which I have not tried though it looks very nice
  • dasBlog – the blog engine you’re reading from now unless of course you’re using a $g(feed reader).

For my personal blog dasBlog was particularly appealing for the following reasons:

  • Runs on ASP.NET
  • The feature set
  • It’s Open Source
  • Actively being developed
  • Widely used as I’ve run into it on lots of blogs though I have no idea of the actual size of the community
  • Does not require a SQL server (a $10/month cost savings on DiscountSP.NET)
  • Easy FTP content backup
  • Easy to understand
  • Easy XCOPY deployment
  • Allows for total flexibility WRT to skinning/theming
  • Supports mobile devices
  • Supports all of the standard blogging things like trackbacks, pingbacks etc.
  • Supports Google Sitemaps
  • Supports development of custom plugins
  • Built-in FeedBurner support
  • And lot’s more…

I believe that about sums it up. Next, I’ll talk about getting dasBlog downloaded, installed and running.

Reference: Part I

Posting a useful rant

I understand that the point of a rant really isn’t to provide useful
information but instead to vent some anger to a group of people who, hopefully,
can share your pain in some meaningful way. However, if ever you are inclined to
post a rant if you could keep the following in mind it might help your fellow
trenchmates who take the time to read your rantings to actually help you out.

  • Focus only on the facts as you know them
  • Be as specific as possible about what the problem is and how you got there
  • If there is an error message involved post the complete text of the
  • Try not to embellish or if you have to try to be conservative
  • Avoid name calling
  • At the end, state that you feel better, I know it’ll be hard to do, but that
    way people will know you’re ready to move on and actually be open to offers for

If you can’t seem to do any of the above you might want to save yourself the
typing and utilize whatever your favorite release mechanism is not related to a

That’s all I can think of for now, if I come up with anything else I’ll add
on as necessary.