Category Archives: BlogEngine.NET

WordPress on Google AppEngine and Migrating from BlogEngine.NET

In 2004 I started blogging on my own domain using as they offered a competitive hosting package based on Microsoft technology. Fast forward nearly a decade and I haven’t used Microsoft technology for nearly 5 years and maintaining my Blogengine.NET blog had become an increasing challenge. Upgrades were very difficult and I found myself stuck on a tweaked version that couldn’t have easily be upgraded. Recently, Google added support for PHP on Google Appengine and posted steps to get WordPress running so I applied for and got early access and I’ve been slowing migrating all of my content.
Continue reading

Upgrading to BlogEngine.NET v2 on

I’ve been testing a v2.0 install of BlogEngine.NET for quite awhile but first had to get this problem fixed and fortunately, a contributor to the community blogged a response (thank you). While the solution was pretty straightforward having moved completely to OSX back in October getting setup to simply recompile the core BE assembly was a little more involved requiring a VM etc.

For me the single largest benefit is the addition of recaptcha for reducing comment spam which in recent months had grown completely out of control though there’s plenty more to like about the new version.

To make the upgrade I installed BE v2 in a new directory on my account and copied my post data and images over to the new install. I also setup my extensions and theme and got all the various bits in place before pulling the trigger. Once everything was ready I tried to rename my /blog folder using $g(FireFTP) which resulted in an “Access denied” error. It turns out that I hadn’t removed the IIS application from the /blog folder via the control panel. Once I did that I was able to rename /blog to /B515 and replace it with my new v2 install folder.

Need for help with IIS URL rewrite rule for BlogEngine.NET v2.0

Executive Summary

Essentially, I’m looking for help with creating an IIS URL rewrite rule to support the following:

Existing modified BlogEngine.NET v1.5 style post URL:

BlogEngine v2.0 style post URL:

I need a rule that will accept the prior and redirect/rewrite to the latter. I’d prefer whatever option has a minimal SEO affect.

Any ideas?


My blog software is BlogEngine.NET v1.5 and I want to upgrade to 2.0 to take advantage of a number of new features. When I moved to BlogEngine.NET several years ago one of the things I wanted to maintain was support for my dasblog style URL’s which didn’t include “/post” in the path. Back then I tweaked BlogEngine to remove the “/post” path from post URLs but when looking to upgrade to v2.0 I see there were significant changes so my code wouldn’t port easily especially considering I’m no longer running Windows except in a VM on OSX and only have access to the VS.NET Express which doesn’t support multiple projects in a solution making debugging this issue pretty difficult since the code is in a satellite assemble and not the core website.

As an alternative I’m considering simply rewriting/redirecting my old URL’s to include “/post” in the path though I’ve done some playing around in the IIS Manager but have yet to achieve the desired result.

That’s where you (hopefully) come in. I’m pretty sure this is possible but need help creating the necessary rule(s). I’ve got BE v2.0 setup on my domain so I can conduct testing using this alternative path quickly.

Thanks in advance…

Just FYI, I’m getting so much comment spam on BE v1.5 I’ve closed comments after two weeks so if they’re closed please use my contact link instead.  Thanks.

Upgrading from BlogEngine.NET v1.5 to v2.0

Warning: If you’re not a BlogEngine.NET user you may want to continue looking for other interesting stuff on the intertubes.

I’ve been running BlogEngine.NET v1.5.1.28 for quite some time with a number of extensions I’ve either added or written. Additionally, I created a custom theme and including things like a ScriptCombiner and SyntaxHighlighter, the later of which is included with v2.0. In order to move to the v2.0RC I’ve been slowly upgrading in a separate directory and I’m using this post to keep track of the changes required to upgrade.

Beyond the upgrade steps here I had to make a few minor changes to some of my widgets. Primarily the problems boiled down to adding a few using clauses:

using App_Code.Controls; 
using BlogEngine.Core.Web.Extensions;

As I’ve already mentioned I’m really looking forward to the improved comment handling.

I’m updating this post as I go so last night I tried to pull the trigger on the upgrade only to realize that I’d made a tweak to the BlogEngine.Core assembly to change the URL handling. Previously, when I upgraded from dasblog I needed to preserve my URLs and BlogEngine.NET uses the format /blog/post/postname.aspx which for me means I have to get rid of /post as that’s not compatible with my old URLs. After restoring my v1.5 version I’m now working to isolate the changes I made October 2009 and patch v2 so I can upgrade. I only wish I’d included a bit more detail at to exactly what I changed. 🙂

Btw, thanks to the group of people working to maintain/upgrade BlogEngine.NET.

Improving Site Performance

I run BlogEngine.NET and recently logged into Google WebMaster Tools and was a little surprised to read the following paragraph and see the related chart:

Performance overview

On average, pages in your site take 6.8 seconds to load (updated on Apr 4, 2010). This is slower than 82% of sites. These estimates are of low accuracy (fewer than 100 data points). The chart below shows how your site’s average page load time has changed over the last few months. For your reference, it also shows the 20th percentile value across all sites, separating slow and fast load times.


Yikes! Not. Good.

As you can see I was able to make some quick changes in March that helped but clearly I’m far from being in the sweet spot.

What I Did

Using Google’s Page Speed and Yahoo’s YSlow I started chipping away at the issues. I started on the JavaScript side and added this combine, compress and minify HttpHandler which turned out to be quite easy. Next, I applied Ken Silverman’s pngout utility (warning: his background will hurt your eyes) to my images and minified and combined several CSS files as well as set default images sizes.

Updated April 11, 2010 I’ve turned off Gravatar because it’s too damn slow particularly for pages with lots of comments. That page used to take 10 seconds to load now it’s just a few seconds.

Migrating to IIS7

Over the weekend I took the plunge and used the Migration tool on my discountASP.NET (which btw, I highly recommend) account and moved to IIS7. You can read about how that went here but for the most part things were pretty seamless although my site was down for 16 hours or so. After the migration I setup the MS IIS Manager for remote administration allowing me to set cache expiration headers for lots standard images.

The net result, starting at 78/100…

Page Speed Score 88/100

And from a “C” to an “A” on the YSlow report card:

YSlow performance score

At this point, it’s going to be a few more days before Google’s WebMaster Tools re-executes its performance tests but I’m hoping for some dramatically improved results.

What’s your verdict? How’d I do?

[Update April 13, 2010] This chart from Google WebMaster Tools of download times is starting to show the improvements I’ve made:


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.

A few minor BlogEngine.NET TextBox widget improvements

I really like the ability to use multiple widget zones, it’s a great feature that offers a lot of flexibility WRT theming. There is one drawback which is BE makes some assumptions and places hardcoded markup in the TextBox widget which is not desired. I’d like to see two minor changes along these lines which I think would help improve the usability. First, WidgetBase.cs has an assumption that if the title of the widget is not displayed a gets inserted which IMO is not desired. Second, the $g(tinyMCE) editor used by the TextBox widget wraps all content in <p> tags which is also not desired IMO. I like to use the TextBox widget to place any markup on my theme including <script> blocks therefore in WidgetBase.cs I’d like to see the following change:

if (ShowTitle)
  sb.Append("<h4>" + Title + "</h4>");
  sb.Append("<br />");


if (ShowTitle)
  sb.Append("<h4>" + Title + "</h4>");

And in Widgets\TextBox\edit.ascx add the option for TinyMCE for:

forced_root_block: false

I’ve already made these changes for my blog which makes the TextBox widget much more useful. I now have an editable sidebar, banner region, page footer and footer script block.

If you’d like to join a conversation on the topic I’ve posted this to CodePlex.

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