Quick comparison between .Net based CMS


, , , ,

Hello Friends,

The big question asked to me no. of times.

Which is the best CMS running on .Net Platform

While replying on Experts-Exchange website, Recently I came across same question : “Which is the Best CMS running on .Net”

Detail question:

I am looking for some tips on a good cms that i can use for a customer that needs to easy update the site, we can implement a responsive css we got and we need to be able to add custom code for showing products from database and so on.

There were few answers. I replied with a Quick comparison between few CMS I have worked with.

My Answer:

This question has unlimited answers.
We have been working in CMS domain since many years.
We have worked on following in .Net domain

  • Sitecore
  • Umbraco
  • Kentico
  • Orchard

All 4 are very good.

  • If you want a simple site with easy updates go with Umbraco.
  • If you want a site where everything is readily available and you don’t want to work much anything then go for Kentico.
  • Looking for Pure MVC based CMS then Orchard.
  • If you need to add a lot custom code to display, Flexible, easy for editing for client, Multi Lingual Support then go for Sitecore.

All above mentioned CMS are available in MVC.
Our Experience says, Money spent on Sitecore is worth. Especially when you want to add lots of custom code to read and display.

You can add Responsive Design in any of the mentioned CMS.

The Author was looking for such quick comparison, So he liked the answer and I was rewarded 2000 Points. 500 Points for the Question * 4 (Grade A ) = 2000 Points.

Link for the Question

Some more thoughts on these CMSs.

  • Umbraco: A Simple, easy to use, Open Source CMS. Learn using Paid Video subscription. I created 5-6 pages in few hours of starting with Umbraco.
  • Kentico: Free and Paid Versions are available. Most of the Web parts are readily available OOB. Lots of settings. Sometime its confusing.
  • Orchard: MVC Based. According to news it is supported by Microsoft Employees. Growing fast with more and more people joining the Community. This CMS looks promising. (Still it will take some time to reach to a Mature CMS Level)
  • Sitecore: An Enterprise level CMS. One of the leading CMS. Extensible. Great Community Support. Great Product Support. Lots of Flexibility. Very famous for Multi Lingual Support. Also Supports Multi Device, Multi Instance, Multi Site solutions. costliest out of these 4. but still much cheaper than Tridion & SharePoint.

Planning to have a have a detailed review for all 4 CMS.


How to create Handler in Sitecore


, , ,


Creating a Handler in Sitecore is not a straight forward task, so to explain this I have taken example of Managing Robots.Txt file in the Sitecore CMS content Tree.

  • We need to store and update the Robots.txt contents in the Sitecore content tree — This is a Normal process same as creating a Page in Sitecore.
  • When robots.txt is requested then read the related Sitecore node and display the content on page. — Handler is implemented for this


When a txt is to be handled by asp.net, we create HTTPHandler.
To achieve the same First we created a TxtHandler and mapped it in IIS. Our TxtHandler was getting the requests for Txts. This was working fine but we were not able to access the Sitecore from Handler as the Sitecore.Context was not available in the Handler. If we don’t get the Context then we can’t access the Sitecore Tree and the Robots Txt Item.

Different Solutions
One solution was to handle it from Application_BeginRequest in Global.asax. But If we let the code run till global.asax then all Sitecore Pipelines will be executed and which can create the performance overhead as we don’t need to load Layout or anything else. We were looking for option where we can skip loading the Sitecore Pipelines and reduce performance overhead.

After some analysis and R&D we got a perfect solution

The Solution  
Create a Processor by inheriting HttpRequestProcessor from Sitecore.Pipelines.HttpRequest

Get the HttpContext in the code and get the/ Current URL. If URL ends with Robots.txt then go ahead else skip the code

If URL matches with robots.txt then get the Current DB from Context.Database and get the Robots item from the Sitecore Content Tree.

Till now the task was simple. Now here is the twist. We don’t want to process anything after this Processor is executed, functionality should be similar to Handler. We wanted to display the text from RobotsTxt item and display on the screen as Plain Text. No other pipeline should be called. We thought of some code which can skip the remaining pipeline, like setting a flag (if there is any) which can skip other pipelines. But there is no such flag or code.

But we came up with much simpler method. Response.End(). And that did the trick.

Coding part is done. Let’s go to Web.config. We need to place the Processor at a location where we can get the Sitecore Context. We tried with first line in but the context was not available. Then we started moving one line below and run. According to our understanding at least SiteResolver will load the Context and we were correct. So best placed position is right below SiteResolver.

Web.config Changes

<processor type="Sitecore.Pipelines.HttpRequest.SiteResolver, Sitecore.Kernel" />

<!-- Custom Processor, The best place is after SiteResolver.   -->

<processor type="SND641.Customization.RobotsModule, SND641" /> 
Code for Processor
using System.Web; 
using Sitecore.Data;
using Sitecore.Data.Items;
using Sitecore.Pipelines.HttpRequest;
namespace SND641.Customization
    public class RobotsModule : HttpRequestProcessor
        public override void Process(HttpRequestArgs args)
            HttpContext currentContext = HttpContext.Current;
            string sRequestedURL = currentContext.Request.Url.ToString().ToLower();
            if (sRequestedURL.EndsWith("robots.txt"))
                string sOutput = "";
                Database CurrDb = Sitecore.Context.Database;
                if (CurrDb != null)
                    Item RobotsItem = CurrDb.GetItem("/sitecore/content/Home/RobotsTxt");

                    if (RobotsItem != null)
                        sOutput = RobotsItem["Robots Text"];
                        sOutput = "Item is not found in " + CurrDb.Name;
                currentContext.Response.ContentType = "text/plain";
Points of Interest 

When I googled for the Solution for this kind of issue, I didn’t find any article which can explain me what to do when I want the Sitecore Context in the Handler. Even I tried to find Sitecore Documents. but no success.

Then in a document I found code for Processor so We thought of creating a Processor which can work as a Handler.

So far this was the only way we can have functionality of Handler in Sitecore.

Other Usage
This is useful when we have to handle some custom extensions like XML (Sitemap.xml) or ICS (outlook Calendar file).

Works with  
This Code works with Single Site Instance of Sitecore. Implementation for Multi-Site Application will be similar.