Click here to Skip to main content
15,393,377 members
Articles / Web Development / ASP.NET
Posted 26 Nov 2005


71 bookmarked

SharpCMS, an Open Source portal server built on ASP.NET 2.0

Rate me:
Please Sign up or sign in to vote.
3.74/5 (10 votes)
26 Nov 2005CPOL4 min read
A CMS built using WebParts and MasterPages.

Sample Image - SharpCMS.png


For quite some time now, I have been investing time in ASP.NET 2.0. Because there is no better way to study than to just experience the product by using it thoroughly, I decided to build a portal server application using the new WebPart framework and MasterPages. My goal was to build an application which I can use to host my new-found home on the web,, and to be able to use skins extensively on this site. Why skins? Mainly because my HTML skills are lacking so to speak. I create horrendous looking websites. Using skinning, I can create the content and let somebody else worry about making it look nice! The result? SharpCMS! (Until someone thinks of a cooler name maybe...)

What is this SharpCMS then? It is a portal server application built in ASP.NET 2.0, a bit like DotNetNuke. Not feature-complete yet, but a nice start has been made. Some of the current features include:

  • Skinning of pages and modules (WebParts), using MasterPages and UserControls
  • Custom rendering for the popup menus found on a WebPart
  • Dynamic creation of portals and sub portals, pages, and of course, WebParts
  • Security, who can access portal / view page, etc... (almost entirely done)
  • Custom providers for the provider model to, for instance, provide default user accounts for new portals
  • URL rewriting to make each portal searchable by search engines
  • A data access layer which gracefully handles nullable types and other conversions
  • Database storage for resource files

Because of the new features found in ASP.NET 2.0, all kinds of nifty features are easily added, such as client-side drag and drop for the WebParts (which also works with skinned WebParts!). You can easily use any server control as a WebPart. The Login module is an example of this; it uses a Login control.

I am releasing this project as Open Source (duh), and after some research, decided on the new Microsoft licensing schema. I am really looking for others interested in investing a bit of time in this project; discussing architecture and such is really boring when talking to yourself the whole time!

In the mean time, you can download the alpha version of SharpCMS using the links found on the top of this page. This download provides a pretty primitive version; you will need to install the database using SQL scripts and such. In the future, I am planning to incorporate MSI installers. Also, this version is in mid-development, and I am not using any real versioning yet. So some namespaces and classes are there, but not doing anything yet. It does compile and run as expected on my machine using IIS as the host.

There have been many technical challenges presented by developing SharpCMS, which I am keen to share. Keep an eye on my homepage, which of course, doesn't have a nice skin either! I use it as a deployment testing ground, and in the future, maybe a home for SharpCMS. I wrote a separate article regarding some of the long nights which accompanied this application, for those interested in the technical side of this story... nah, that's probably none of you :)

Installation instructions

You require .NET 2.0 and SQL Server.

  1. Download the binaries.
  2. Deploy them to an IIS website or virtual directory.
  3. Go to the SharpCMS.Database directory, and from there, run all the 'runall.cmd' files in the following order:
    1. Create Scripts
    2. TextModule
    3. AnnouncementsModule
    4. Stored Procedures
    5. Fill Scripts
  4. Install all provider databases using the 'aspnet_regsql.exe' utility, or use the 'ProviderDatabases.cmd' command file.
  5. Modify the web.config file. Change the connection string for the SqlClient connection as you require.
  6. Make sure the account running ASP.NET has access to the database and access to the file system in the SharpCMS directory.
  7. If running on IIS:
    1. Go to the IIS settings panel for the website / virtual directory.
    2. Open the 'Home directory' tab.
    3. Select the 'Configuration' button.
    4. Map the '.res' file extension to 'aspnet_isapi.dll'.
    5. Make sure that the 'Check that file exists' setting is turned off.
  8. Ready to run! A new user account will be added for you by default. You can log in with the username 'Host', using the password 'pass@word1'.


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


About the Author

Wouter van Vugt
Web Developer Code Counsel
Netherlands Netherlands
Wouter van Vugt is a Microsoft MVP with Office Open XML technologies and an independent consultant focusing on creating Office Business Applications (OBAs) with SharePoint, the Office 2007 system and related .NET technologies. Wouter is a frequent contributor to developer community sites such as and MSDN and has published several white papers and articles as well a book available on line titled Open XML: the markup explained. Wouter is the founder of Code-Counsel, a Dutch company focusing on delivering cutting-edge technical content through a variety of channels. You can find out more about Wouter by reading his blog and visiting the Code-Counsel Web site.

Comments and Discussions

GeneralContent!!!!!!!!!!!! Pin
yg.rajesh14-Mar-09 4:41
Memberyg.rajesh14-Mar-09 4:41 
QuestionCMS project Pin
Amir Mokarram7-May-07 6:22
professionalAmir Mokarram7-May-07 6:22 
AnswerRe: CMS project Pin
Prabhu Chakkaravarthy10-Sep-07 0:54
MemberPrabhu Chakkaravarthy10-Sep-07 0:54 
AnswerRe: CMS project Pin
farzane705-May-14 4:01
Memberfarzane705-May-14 4:01 
GeneralRe: CMS project Pin
Amir Mokarram12-May-14 19:49
professionalAmir Mokarram12-May-14 19:49 
GeneralRe: CMS project Pin
farzane7012-May-14 21:31
Memberfarzane7012-May-14 21:31 
GeneralCant install batch files Pin
sureshprogrammer28-Feb-07 1:17
Membersureshprogrammer28-Feb-07 1:17 
Generalrun error Pin
dinolee13-Dec-06 23:16
Memberdinolee13-Dec-06 23:16 
GeneralSQL? I don't setup Pin
H.Hom14-Nov-06 21:31
MemberH.Hom14-Nov-06 21:31 
GeneralSystem.NullReferenceException Pin
sunixnt13-Aug-06 17:46
Membersunixnt13-Aug-06 17:46 
GeneralAccess Denied [modified] Pin
dvptUml1-Jul-06 7:25
MemberdvptUml1-Jul-06 7:25 
An error 403 on your web site and unable to login !!

-- modified at 13:25 Saturday 1st July, 2006
GeneralParser Error Message: Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'. Pin
teixeira198530-Jun-06 9:14
Memberteixeira198530-Jun-06 9:14 
GeneralRe: Parser Error Message: Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'. Pin
hquesada20-Oct-06 3:59
Memberhquesada20-Oct-06 3:59 
GeneralI cant make DB Pin
Youssef Saad18-Jun-06 21:11
MemberYoussef Saad18-Jun-06 21:11 
GeneralRe: I cant make DB Pin
Wouter van Vugt18-Jun-06 23:50
MemberWouter van Vugt18-Jun-06 23:50 
GeneralGeart Work !! Pin
WaleedS27-Feb-06 2:15
MemberWaleedS27-Feb-06 2:15 
GeneralRe: Geart Work !! Pin
WaleedS27-Feb-06 2:19
MemberWaleedS27-Feb-06 2:19 
GeneralMany null reference errors Pin
Keith Farmer27-Nov-05 23:13
MemberKeith Farmer27-Nov-05 23:13 
GeneralRe: Many null reference errors Pin
Wouter van Vugt28-Nov-05 8:32
MemberWouter van Vugt28-Nov-05 8:32 
GeneralRe: Many null reference errors Pin
Keith Farmer28-Nov-05 9:12
MemberKeith Farmer28-Nov-05 9:12 
GeneralRe: Many null reference errors Pin
Jeffrey Scott Flesher26-Jun-06 8:22
MemberJeffrey Scott Flesher26-Jun-06 8:22 
GeneralRe: Many null reference errors Pin
Wouter van Vugt26-Jun-06 9:29
MemberWouter van Vugt26-Jun-06 9:29 
GeneralForgotten the http Pin
Wouter van Vugt26-Nov-05 15:18
MemberWouter van Vugt26-Nov-05 15:18 
GeneralRe: Forgotten the http Pin
Gary Thom27-Nov-05 0:46
MemberGary Thom27-Nov-05 0:46 
GeneralRe: Forgotten the http Pin
Wouter van Vugt27-Nov-05 1:13
MemberWouter van Vugt27-Nov-05 1:13 

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.