This site uses cookies. By continuing you accept the use of cookies.I Accept

The Mindbite Update Service is a vital part of SiteFactory CMS because it keeps all websites up to date. This feature was introduced in SiteFactory CMS 4.0 and was considered a major feature in the planning. The idea of having a Service pushing updates to our customer’s websites has been discussed for several years, but now it was time to make it happen. With over 165 websites running SiteFactory CMS we simply had to pull it off.

Before Mindbite Update Service we updated all websites manually which was extremely time consuming. Depending on the update it took between 10 minutes and an hour to update a website. Updating over 165 websites manually took a long time and we had no ability to push urgent bug fixes.

With Mindbite Update Service we can push updates to the websites at any time and since its release on November 11 –2010 we  have already released 25 updates of various size and severity to our SiteFactory CMS 4 websites. So in a little over three months we have released more updates to SiteFactory CMS 4.0 than we did with SiteFactory CMS 3.0 in over a year and half. The difference, of course, is that the updates in SiteFactory CMS 3.0 were larger than the updates in version 4.0, but mostly because we didn’t have the ability to update all customers at once.

Service Capabilities

Mindbite Update Service is installed in our Server Farm that consists of servers running Windows Server 2008 R2 and SQL Server 2008 R2. The Service automatically manages all subscriptions (SiteFactory CMS websites). Every website communicates with the Service and upon the first authentication the Service creates a new subscription and connects it with the website. The communication between the subscriber and the Service is logged and secured with an encrypted data package to prevent other people to tamper with the Service.

All updates released to SiteFactory CMS are securely stored in the Service, together with all update meta data. When we push install an update to a website, we save an installation log entry so that we can follow up on every installed update.

To be safe, we never push updates to all websites at the same time. Instead we select 5-10 subscriptions and verify every installation. Before an update is installed, the Service checks all files included in the update package and takes a backup of existing files that are about to be upgraded. When the installation is done and the system gets a success message, the backup is purged. If something goes wrong the system restores the backup and notifies us what happened. This is just a fail safe though. We have pushed over 500 updates with this technology without any hick-ups.

Subscription list in Mindbite Update (Swedish only).

The Update Package is structured and can be configured to add/update files and if necessary modify configuration files and the SQL database. It can basically be configured to do whatever you want it to do, so it’s very flexible.


Since we push updates to live SiteFactory CMS websites, we must always be sure that the new code, that is being installed, is never modified in a way that would create conflicts in custom implementations. Deleting a class or a method could result in a major crash if a developer has used it in an solution. Therefor we put a lot of effort in making the SiteFactory CMS 4.0 Core libraries as solid as possible. Namespace paths for instance will never change in any future release. Only new and/or modified features will be released. Code could ultimately be attributed as obsolete, and a change would be suggested, but it will never throw errors.

Closing comments

The Mindbite Update Service is a part of our SiteFactory CMS that we are particularly proud of. Thanks to it we can distribute bug fixes and new features in no time. Now we can utilize our time to create more features and make SiteFactory CMS an even better product.

The Service is scalable and we can connect other products to it without much work.

Yesterday Microsoft released Internet Explorer 9 RC. One of the new features is Windows 7 JumpList integration. This morning we released a new update to SiteFactory CMS with full support for IE9 JumpList.

By default there are three standard activities in the SiteFactory CMS JumpList; New page, Write new Blog Post and Global Variables manager. We will be pushing out new updates with new standard activities later on.

This makes SiteFactory CMS one of the first Content Management Systems with built-in JumpList integration.


Extending SiteFactory CMS with custom activities

In this update we also released a new Eventhandler that is triggered when the system is pushing the JumpList Activities to the output. This gives our developers a way to add or modify existing JumpList Activities.

An example showing how to add a new Activity to the JumpList.

The result of the example extension.

One of the greatest things about SiteFactory CMS is the ability to extend it with Extensions. To make this possible, we developed an extension engine that was introduced in SiteFactory 3.0 SP3, and enhanced in SiteFactory CMS 4.0.

The extensions interacts with Eventhandlers in the system and we are adding more Custom Eventhandlers regularly.

Today we have Custom Eventhandlers in these areas:


The Page Object has the following Eventhandlers:

Every time a page is sent to the output this Eventhandler kicks in and the PageServingEventArgs presents the HTML-output (Body) and you are able to make changes to it just before it is sent to the output.

A simple example that converts the Body content to Upper Case.

When a page is created, modified or deleted OnSaving is triggered. With the PageSavingEventArgs you can access the altered Page Object and also the type of change that was made.

This example sends an e-mail regarding the change.

Blog Module

The Blog Module currently has these two Eventhandlers that are similar to the ones in the Page Object.

Is triggered when a blog post is sent to the output.

Is triggered when a blog post is created, modified or deleted. This is very useful when you want to attach a class for publishing a blog post to services like Facebook and Twitter.

Mindbite Core Foundation Server

The Core has these powerful Eventhandlers:

When a user Signs On to SiteFactory CMS with internal credentials or public credentials this Eventhandler is triggered which gives the developer the ability to catch the User Object. It is also possible to cancel the Sign On Sequence.

Every time a change is made in the system, the Google Sitemap is regenerated (sitemap.xml) with new urls, timestamps and other SEO data. By default only Page Objects are represented in the Google Sitemap, but if the web site has other urls that must be added to the sitemap, the developer can use this Eventhandler to append new nodes in the sitemap.

This example adds the dummy url “” to the Google Sitemap, and appends some SEO data.

This Eventhandler is similar to the Google Sitemap Eventhandler, but it affects the Web Sitemap in the web site.



Closing comments

Extensions is a powerful and easy part of SiteFactory CMS, and it’s used in almost every project.

In my 4th part in this series I’ve decided to blog about Mindbite Core Foundation Server and our Update Server that keeps SiteFactory CMS 4 web sites updated with the latest version.

Yesterday I wrote about “All the small things” that make SiteFactory CMS a great system. In this post you will read about PageTypes and Url Rewriting in SiteFactory CMS.


PageTypes is a brand new feature that we released last week. With PageTypes you can define exactly what a Page Object is. By default a PageType is a class Page (web page), but you can create new PageTypes e. g. News post, Calendar Post or a Customer Reference. Well, pretty much whatever you want it to be.

In the text below I will refer to the “Page Object”, which must not be confused with the Page class (System.Web.UI.Page). Our “Page Object” is referred to as a web page in the System.


You want to build a classic News Administration, so you create a PageType called “NewsPost”, then you create your module that handles the administration of your news posts. When it’s time to create a News Post you simply call the SiteFactory Core telling it you want to create a Page Object. The Core will return a new Page-ID that you connect to your Module.


What this example doesn’t show is the the data you must send to the function. Before you receive a Page-ID a Controller checks if it’s ok to create the Page Object (based on the data you provide).

In most cases you re-use the Page Object Fields for your Modules data. Since the Page Object has a great amount of fields (like Title, Url Rewrite Key/Alias, Excerpt, Text Content, Publish On date, Unpublish On date, Search Engine Fields and many other) this is in many cases enough for your module. But you still have full availability to store whatever fields and/or data you want in your module that is connected to the Page Object.

Why PageTypes are perfect

The Page Objects are tightly integrated with our Url Rewriting Engine so you get pretty urls without having to write your own code or rules to make it work. The full url of the page can be returned quickly by the Page Object:


As I wrote earlier, the Page Object holds many Fields that you can re-use for your Module/Page Type. And code re-use is always good.

You can create as many PageTypes you want. The possibilities are endless.

The original idea for our PageTypes comes from our great colleagues Alexander & Kim that surprised us with a custom implementation of PageTypes in an existing SiteFactory CMS solution. So after a developer meeting we all agreed that this was our top next feature for our product. So only about a week later it was fully incorporated into the source code and was soon after pushed out to our customers.

Url Rewriting

In the spring of 2008 we decided to include Url Rewriting in SiteFactory CMS. We did this in the final minor release of SiteFactory 2 (2.1.1). Soon after we started developing SiteFactory 3.0 where we extended the capabilities of  Url Rewriting.

In the Configuration files you can choose between two types of Url Rewrite rules. One works straight of with IIS 6.0 (without custom configuration in the IIS). The other one uses Url Rewrite Module for IIS 7.

IIS 6.0

When using IIS 6.0 you must have a file extension for your page (e. g. You can however choose (almost) any file extension, so you don’t have to use .aspx.

IIS 7.0

This is most commonly used when we deploy projects. Here you can build your own rules and you don’t need the file extension (e. g.

Setting it up

First you must make some simple configurations in the Settings Configuration file.

As you can see you have the ability to not use Url Rewriting. But the url will look like this Ugly, right?

Depending on which version of IIS you will use we provide two Web Configuration files where the rules are configured.


All the basic rules that you need are already configured in these files.


If you want to create custom lists with Page Objects you can always get the url (and other data) from the Page Object.

Very simple Repeater implementation.

Url Rewrite any string

With our Extension Methods you can format any string making it valid for Url Rewriting.


Closing comments

I hope this shows you how easy it is to work with PageTypes and Url Rewriting in SiteFactory CMS.

I haven’t yet decided what to write about in my next part of “The Power of SiteFactory CMS”. If you have anything you want me to write about, post a comment.

One of my main focuses at Mindbite is developing our largest product SiteFactory CMS which is a Content Management System built on Microsoft .Net Framework. The initial version of SiteFactory was released in the beginning of 2005. Since then the product has grown very large. We have more than 170 web sites running our CMS. The version number is now 4.0 and it runs on .Net Framework 4.0. We’ve managed to sync our major releases with the framework.

So this is the first part of many where I will introduce you in the technical features of SiteFactory CMS and why this is a product that competes with the big dogs.

Product development

Developing a product like SiteFactory CMS is done in a very strict fashion. The source code is stored in a Team Foundation Server project and all bug fixes and new features are developed by me. Everything is of course tested by my co workers before release. All new versions are pushed out to our developers and later on distributed to our Update Server that handles all updates to our customers web sites. All though this work method has been refined during the years of development we have always built SiteFactory CMS as a product.

Before 2005 when we didn’t have a product for Content Management, we took the previous built Administration interface and simply copied it to the next customer. So the last customer always got the best features.
The turning point was in 2004 when started developing SiteFactory CMS. We realized that we had to do this smarter. So we set up a Visual Source Safe project that held the source code. When Team Foundation Server 2008 was released we migrated to that. And now we use Team Foundation Server 2010. So the product has a strong base where every version is documented.

All the small things

The product incorporates all the features a worthy CMS should, e. g. full page control with smart content editor, Url Rewriting, Templates, the ability to extend it with modules and much more. We believe that these features should be taken for grated when choosing your Content Management System, so in this post I will focus on the small things that makes it easy for a developer to set up a web site using SiteFactory CMS. All the small things eventually ends up to something beautiful.

At Mindbite we have a saying; “Never do the same thing twice”. Code re-use is something we love. So every time any of our developers has to implement the same code twice in a solution, we incorporate the code into our source code instead. The rule is to test it in one solution before it makes its way in to the source code.

One of the largest single classes in the source code is our Utilities class. This class holds long over 100 methods and functions that will help the developer to do common tasks.


This class holds functions that converts text, e. g. IDN converter for Domain names containing national characters, and many other functions.


You can put any type of structured data (DataSet, DataTable) into this class and get a response in XML or CSV.


Commonly used DateTime functions are stored here. And hey, if you easily want to find out the week number for 2043-12-05 this is the place to look. Or if you want the Swedish name for month number 4, we have neat functions for that.


This may be the class I use most often when I build modules for SiteFactory CMS. You can with one line of code convert a file to bytes or bytes to a file. You can zip a file/folder, and write a file or bytes to the response header. You can also determine if a file is an image file. This class holds this and much more.


This is also a favorite class. This class lets you with only one line of code resize, rotate, crop, change image quality, watermark, append text or an image to an image and much more. You can either let the class return the processed image as bytes or save it as a file directly.

It’s not only smart and easy, it’s quick too.


The simplest part of our Messaging class is sending an e-mail. But as with almost everything here you do it with one line of code.

This class is also a messaging layer which transports all messages in the SiteFactory CMS system. For example, when a form is posted, we put a message into the system and the GUI retrieves it and displays it to the user.

Other help methods/functions

We also have functions that can return the application’s path in different ways or return different types of random characters or numbers. Thanks to Regular Expressions we can parse links/anchors in the content you provide.

Closing comments

This was the first post in what I expect to be a long series about the features in SiteFactory CMS from a technical point of view.

In Part 2 I will focus on PageTypes and Url Rewriting.

A week ago I blogged about Excel Interop in .Net. Today we released the customer solution that uses Excel Interop to create Excel files. First I want to present some new issues that we learned from when deploying this solution.

Excel Interop in a Web Application

A web application doesn’t by default use valid security credentials when running. So if you want to create some sort of Office document programmatically, you must provide a valid users Username and Password in the Web.Config. We also found other issues by doing this, and from what I’ve read it’s not recommended to do this in a Web Application. In our case we hit a dead end and started building a different solution for creating the Excel files.

Task Scheduler and Excel Interop

Our solution which is web based takes a user’s input and based on that creates an Excel file that contains an extensive report. Our “workaround” for the above issue was to create a log where every request is stored. Then we built a Windows Console Application that reads the log, creates the Excel file and sends it as an attachment in an e-mail to the person who requested the file. The Console Application is triggered every 3 minutes by the Task Scheduler.

Now we learned something new. Excel which is instantiated by the Console Application, can only run if the calling user has a Desktop folder. Since the Task Manager runs this application unattended, we have no Desktop folder.

After some digging in various forums I found the answer, and fortunately the solution.

If you run Windows Server 2008/2008 R2 in x64:
Create a folder named “Desktop” in C:\Windows\SysWOW64\config\systemprofile\

If you run Windows Server 2008/2008 R2 in x86:
Create a folder named “Desktop” in C:\Windows\System32\config\systemprofile\

The user who is declared as the running user in the Task, must have write permissions in the Desktop-folder

The final Application

The solution I’ve been writing about is Nationella Viltolycksrådet; In this web site all Swedish accidents with wild life are reported. Over 7 000 persons work daily, reporting these accidents into the system. Therefor we have access to a great amount of statistical data.

In this case the visitor can make a selection of the data he or she wants statistics for, then enter the name and e-mail address. In a few minutes the Excel file containing the reports will be sent to the e-mail address.

Try it here:

The web site is only in Swedish.