Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

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

0.00/5 (No votes)
26 Nov 2005 1  
A CMS built using WebParts and MasterPages.

Sample Image - SharpCMS.png

SharpCMS

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, www.dive-in-it.nl, 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'.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here