Pablo Picasso
"Computers are useless. They can only give you answers."
My Latest Tweets
Tags

This will be shown to users with no Flash or Javascript.
Calendar
<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910
Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

Sign in

For those of you who don't know, BlogEngine.NET is a great, free and open-source blogging platform for .NET developers and less-technical people alike.

Apart from the fact that BlogEngine.NET is highly customisable, extensible and has many other neat features such as syndication, what attracted me to it was that it uses ASP.NET and XML as the default data store. This last point is fairly important as most hosting companies will charge you extra for setting up databases even for small web sites. By using XML you can keep the overall cost of maintaining a personal web site to a minimum.

Now that I have completed the installation process, I thought I'll briefly outline the steps I took to be up and running with BlogEngine.NET. Note that it is relatively easy to setup but if you really don't want to get your hands 'dirty' go to WordPress or Posterous; you will be blogging for free literally within minutes. For others, follow on...

Step 0: Backup, Backup, Backup

Before you do anything with BlogEngine.NET, you should first ensure that you have a quick and easy way to backup your blog. As you build up your site and make significant infrastructure or cosmetic changes, chances are that at some point you will want to restore it to a previously known working state. So to be safe either put your files under source control - you can either use Git or Subversion for that - or simply use a batch file like the one shown below. Just replace "<BLOG_ENIGNE_FOLDER>" and "<BACKUP_FOLDER>" in the script and it will copy your BlogEngine folder into a backup folder appended with the current date and time.

echo on  
for /f "tokens=1" %%u in ('echo %time%') do set t=%%u  
if "%t:~1,1%"==":" set t=0%t%  
set now=%date:~-4,4%%date:~-7,2%%date:~0,2%T%t:~0,2%%t:~3,2%%t:~6,2%  
C:  
xcopy /e "<BLOG_ENGINE_FOLDER>\*.*" "<BACKUP_FOLDER>\%now%\" 
echo Done!  
pause

Step 1: Basic installation

To get an idea of what the installation process involves, I recommend you watch this screencast before you start. Assuming you already have chosen a hosting company and registered a domain name, the first obvious step is to download the latest version and follow the installation instructions. No need for me to rehash here what's already covered in the documentation as it is pretty comprehensive and easy to follow. If you went along with these instructions step-by-step, you should have effectively an up and running blog on your local machine.

Step 2: Check your Web.Config settings

In the root of your web application, you should have a file called Web.Config as shown below.

 

BlogEngine.NET files  

Unless you need to troubleshoot some issues with the site, you should not run in debug mode (Debug Mode in ASP.NET Applications) as this will affect performance. Instead set the the debug attribute to "false".

<system.web>
	<compilation debug="false">
	   ...
	</compilation>
	   ...
</system.web>

The other attribute you will need to check in the Web.Config file is the customErrors element and its mode attribute which should be set to RemoteOnly. This ensures that your visitors get the BlogEngine.NET user-friendly custom error message if there is a problem with your site and also prevents potentially sensitive information from being displayed. For more on this refer to the MSDN documentation on "customErrors Element".

<system.web>
      ...
	<customErrors mode="RemoteOnly" defaultRedirect="~/error404.aspx">
		<error statusCode="404" redirect="~/error404.aspx"/>
	</customErrors>
	  ...
</system.web>

Although these attributes are set as above by default on version 1.5 of BlogEngine.NET, it is worth checking that this is the case before you release your blog.

Step 3: Choose a data storage type

BlogEngine.NET stores data as XML by default but you are not restricted to XML. You can switch to other blog providers such as Microsoft SQL Server, MySql, SQLite or VistaDB. As I wanted to be able to save all my data (posts, settings, etc.) into a single file that I could copy back and forth between multiple machines and my FTP site, and I did not want to pay extra for using either SQL Server or MySql, I decided to try out SQLite. SQLite is a free and popular self-contained database engine. Setting it up for BlogEngine.NET only requires two files. Instructions can be found in the "BlogEngine.Web\setup\SQLite" folder. As soon as I deployed my site, which was running fine with SQLite on my local machine, I was baffled to see that it did not work in my shared hosting environment. I kept on getting security exceptions. As it happens most shared hosting plans (including mine) will only let you run your application with medium trust level. However because SQLite calls native code (P/Invoke), your ASP.NET application needs to run in a full trust environment if you want to use it. At the end I had to turn to VistaDB instead. Like SQLite, VistaDB is a file based embedded database engine but the main difference is that it is fully managed. You can therefore run your site with partial trust, which seems to work for my hosting environment. To avoid a lot of frustration either stick with XML or make sure you have considered the other data storage options carefully.

Step 4: Theme and customize your site

OK. If you’ve gone this far in the installation process, the fun starts here. This is where you can make your site your own. Once you’re logged in, head straight to the admin control panel and review the options. There you can modify settings such as your blog title, your contact information, enable comments, manage users, etc. Among other things you will be able to change the theme, that is the look and feel, of your blog. BlogEngine.NET comes with a few pre-loaded themes but you are not limited to them. Check out the other themes available or if you'd like to showcase your Designer skills, you can create your own.

Step 5: Install Extensions and Widgets

You can easily add functionality to your site by installing extensions. In most cases this simply consists of dropping a few files in the "\App_Code\Extensions" folder and configuring the newly installed extension using the BlogEngine admin control panel. I suggest you add Justin Etheredge's anti-spam extension first. As soon as I published my first post, I started receiving quite a few spam in the comments and this extension prevents this from happening. It certainly seems to work for me so far.

For a good example of how widgets work in BlogEngine.NET, have a look at the TwitterFeed-Widget on CodePlex.

Step 6: Uploading your site

You can now upload your site to your hosting environment. The easiest way to do this is to use an FTP client. I find FileZilla very handy and reliable to transfer my blog and manage all the BlogEngine.NET files remotely. Did I mentioned that it is also free?

FileZilla FTP Client  

Step 7: Setup Google Analytics (optional)

Once your blog is out there, you might want to monitor your web site traffic. That's where Google Analytics (GA) comes in. GA is a free service that generates detailed reports, graphs and loads of statistics about your visitors. To set this up all you need is a Google email account and register your site on GA. After you've logged in you will find the tracking code (how to find Google Analytics tracking code) which you can then paste in the BlogEngine.NET tracking script pane under the Settings tab in the admin control panel.

 Tracking script pane

Step 8: Download and install Live Writer

BlogEngine.NET includes an online text editor which is relatively useful for making small changes to your blog entries but is frankly not up to the task for writing full-blown blog posts. Instead use the brilliant Windows Live Writer. Not only has it got a lot of formatting options but more importantly it lets you edit your blog posts offline. Follow this short and excellent guide to install it and integrate it with BlogEngine.NET.

Step 9: Start blogging

That is it. But this was the easy part! What you have to do now is think of something to say...

Final Thoughts

Looking back at the above it does seem like there was quite a bit involved in setting up BlogEngine.NET. However this was a good learning experience and fortunately each step was well documented - I've tried to provide all the relevant links that helped me during the installation process. BlogEngine.NET (and the other free tools) make it affordable to create, manage and maintain a personal blog in relatively little time. But more than anything else what I really like about BlogEngine.NET is that it puts you in full control of your site content, look and feel. If you're a .NET Developer looking for a simple and extensible blogging platform, look no further!

Finally a big thanks to all the team at BlogEngine.NET for giving me the satisfaction of having my own site.

Happy Blogging!

Hello and welcome to TheBooleanFrog. My name is Pascal Arnould and this is my personal blog dedicated to all things .NET, Software Development and anything else (the distractions part of the blog's subtitle) that I might have put on a sticky note before I started using computers. I'm hoping this blog will help me Be a Better Developer and maybe even a better person... you never know :)

I am not a Web Developer, a WinForm Developer or an Alpha Geek but a self-taught Business Developer who enjoys working for and with people. For me Software Development is about team work, daily challenges, continuous learning, adding value and problem solving through technology.

My career as a Software Developer is probably quite atypical in that I started in IT age 32 as 1st-line support and moved over to programming two years later. I have a lot of catch-up to do...

Not only did I start my IT career relatively late in life compared to most of my peers, I also use to despise computers with a passion and tried to avoid them at all cost for a long time. What put me off is that computing was obscure, complicated and totally user unfriendly. The only moments I enjoyed anything remotely digital is when I played Pong on an Atari console at one of my parents friend's house, Galaxian at the local Café and some turn based strategy game at my friend who owned a black and rubbery ZX Spectrum.

Pong

By the time I started working, I could not escape emails, word processing, spreadsheets and the likes. To my surprise computers had grown a lot friendlier. Suddenly they were helping me do my job faster, better and smarter. They were fun and WYSIWYG. I was converted. So much so that in 1994 I bought my first PC, a Gateway 2000 with a massive 700 MB hard-disk and Windows 95 pre-installed on it. Six years later I made the jump into IT and I have not regretted it since.

Although the rest is history, what really sparked my interest in IT is not the technology per se but what you can do with it. Now I can communicate with people in so many different ways without having to pick up the phone, I can automatically proof-read letters, I can create flashy presentations and reports, I can produce my own home videos, I can book tickets for the 2010 Football World Cup over the Internet, I can do my banking online, etc.

And this is what I love about programming. It can transform the way people work and change others life for the better. As a Developer I can make a difference. On top of that knowing that a piece of code I wrote is running somewhere tickles my ego.

The IT industry is a great place to work for. So far it has been very exiting and there's no reason it shouldn't stay that way.

But I diverge and should get back to what this is about. This blog does not pretend to be authoritative about anything as it is just about my thoughts and opinions which people can take or leave. I am primarily doing this as a personal goal. However I owe so much to the .NET community at large that if I could give a little bit back and help someone along the way with any of my (future) posts, it would be terrific. So let's start blogging...