BlogEngine on Mono

So I thought my first post would be about setting up this blog using Mono.

Those who know me will tell you that I’m a massive open source “fan boy” (to use an anti-apple peopleism).  I’ve used mono for a fair few years, and .NET for a lot longer (the days of 1.1 haunt me to this day).

So when I decided that blogging would be a good idea, I thought that the best thing to do would be to choose an open source piece of software that would run on mono. *sound the fanfair* enter BlogEngine.net.

Now, the idea looked great.  My new VPS was setting there, over paid and under utilised, just begging for something to do.  So I researched how to get it up and running on mono, and all research seemed to suggest that it would work “OOTB”.  For the large part, they were right, however, in some ways, they were wrong.

Mistake 1 (BlogEngine.NET)

The site uses MVC, and more specifically the “Razor” view engine.  Although this works on Mono, the standard .NET assembilies don’t seem to work.  Therefore, the following changes needed to be made to the “bin/” directory.

REMOVED:

Microsoft.Web.Infrastructure.dll

ADDED:

Microsoft.Web.Mvc.dll
System.Web.Mvc.dll
System.Web.Routing.dll

Mistake 2 (Mono Install)

Using Ubuntu 11.10 (Oneric Oncelot), I didn’t realise that “/usr/bin/mod-mono-server4” was the only mono server installed for mono, this meant that I was missing “/usr/bin/mod-mono-server2”, which is what Apache2 was wanting.  No problem though as .NET 2.0 applications can be run using server4… so…

cd /usr/bin 
sudo ln -s mod-mono-server4 mod-mono-server2 
sudo service apache2 restart

And presto chango, everything working!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s