Click here to Skip to main content
15,867,308 members
Articles / Web Development / XHTML

Build a Blog Site in 15 Minutes with WebMatrix

Rate me:
Please Sign up or sign in to vote.
4.75/5 (11 votes)
10 Aug 2010CPOL5 min read 44.6K   31   4
How to use WebMatrix to build a blog site in 15 minutes or less

Introduction

This is an article about how to use WebMatrix to get an open source blog engine, configure it and upload it to a live website in less than 15 minutes.

Using WebMatrix to Build a Blog Site

How better to start a WebMatrix blog than by using WebMatrix to build a blogging site? You see, much of the focus on WebMatrix has been on how easy it is to program ASP.NET Web Pages using the ‘Razor’ syntax, but WebMatrix is a whole lot more than just that. One of these things is the ability to easily use Open Source Web applications from the Web Applications gallery. One such app is BlogEngine.NET, which I’m choosing for 2 reasons. One – it uses .NET, which my ISP (DiscountASP.NET) supports, and the other is that it’s a rare blogging engine that does not require an external database, which my ISP, like most others, will charge me extra $ for.

So, here’s how I started. (This is assuming you have WebMatrix. If you don’t, go visit http://www.microsoft.com/web, and start there.)

When you launch WebMatrix, you’ll see the option to create a new application from the Web Application gallery:

Image 1

Select this, and you’ll see the Web Application gallery dialog. Select BlogEngine.NET from there.

Image 2

It will download and install. You’ll then see the WebMatrix workspace with the BlogEngine.NET application loaded.

Image 3

Run the application using the application button, and you’ll see the default BlogEngine.NET page.

Image 4

You’re up and running! Congratulations.

So, let’s take it a step further, and see what it takes to add a blog entry. Well, the default user is ‘admin’ and their password is ‘admin’, so sign in with those credentials, and you’ll see an ‘Add Entry’ item on the right hand side, in the Administration section.

clip_image010

When you select this, you’re taken to a web based HTML entry form. It’s pretty cool, and I’ll use it to write the first post, but I personally prefer Windows Live Writer, which you’ll see integrated with the site (hopefully) later on in this article. For now, enter something simple like ‘My First Blog Post’.

clip_image012

Press ‘Save Post’ when you’re done. You’ll be directed back to the blog post which has been safely written and is now being rendered by your page. Now you see that you have a working blog. Next, see what it takes to get it online.

On the site workspace in WebMatrix, there’s a link to ‘Need Hosting for your Web Site’. If you don’t already have a host, this is a great way to find new hosts that support WebMatrix fully.

clip_image013

If, like me, you already have a site, you can set up the remote publishing location for your website with the settings that your ISP gave you.

clip_image014

Publishing supports FTP, FTPS, SSL and WebDeploy. I’m using good old fashioned FTP, so I enter the server details in the Publishing settings dialog.

clip_image016

You see that you can click the ‘Validate Connection’ button to test it, and set the Site Root directly from within the dialog. Click ‘Publish’ and you’re off to the races. WebMatrix will upload your files.

clip_image018

First time around, it has a lot of files to upload, so it should take a while. A great feature of WebMatrix is the fact that it checks for differences before each upload, so subsequent ones will be MUCH quicker. Once it’s done uploading, your site should be good to go.

What happens next depends on your ISP. I use DiscountASP.NET, which allow me to make a folder on my server (in this case /blog), but ASP.NET needs this folder to be seen as an application by IIS before it can run. I haven’t done that yet, so I get this error.

clip_image020

That’s ok. No problem. Don’t Panic, I know where my towel is. My ISP gives me the option to change it easily, and I’m sure yours does too. If you’re not using DiscountASP.NET, check your ISP’s documentation for converting a folder to an application. With DiscountASP.NET, it’s really easy. Just sign into your account at their site, and select the ‘Web Application Tool’.

Select the folder, in this case ‘blog’, and click the ‘Install Application’ button.

clip_image022

It’ll take a few seconds to work its magic. When it’s done, go back to your site. Bada-bing, you got your first blog. Congratulations!

clip_image024

But wait! You’ve just uploaded a blog, and the entire world knows your user name and password. That’s not good! Go back to your local blog, running in WebMatrix and run it again. Log in with ‘admin’, ‘admin’ and change the admin password. You’ll see the ‘change password’ link at the bottom of the Administration section on the right hand side of the page.

Once you’ve changed the password, go back to WebMatrix, and click the Publish button. WebMatrix will crawl through your site, and find the changes that you’ve made.

clip_image026

Click Continue and only these files will be uploaded. Easy, and fast, right? Now when I go to my live blog at http://www.philotic.com/blog (or www.destinypress.net/blog) I can see that the Log In link doesn’t allow ‘admin/admin’, I have to use my new password instead. Yay!

Guess what? I can also integrate the blog now with Windows Live Writer (WLW). It’s easy. Just open WLW, add a new blog from another service, and enter the blog address (in this case http://www.philotic.com/blog) and the user name and password. You’re then good to go. I wrote this post in Word while working, and will now cut and paste to WLW, and publish….

History

  • 10th August, 2010: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionHow many clients can acces concurrently this blogs that was built by WebMatrix? Pin
Member 1005879614-Jul-13 2:04
Member 1005879614-Jul-13 2:04 
GeneralMy vote of 5 Pin
GregoryW8-Jul-13 20:54
GregoryW8-Jul-13 20:54 
GeneralMy vote of 5 Pin
Manoj Kumar Choubey20-Apr-12 0:33
professionalManoj Kumar Choubey20-Apr-12 0:33 
GeneralMy vote of 5 Pin
koolprasad200311-Aug-10 23:36
professionalkoolprasad200311-Aug-10 23:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.