Portal Development in ASP.NET 2.0

Web Portals have been around for quite sometime. When we think of portals two things come to mind straight away, one being central gateway to information/content and the other being personalized user content which is set based on user's preferences. Prior to 2.0 there was no ready made template/skeleton or infrastructure in place for developing portals and had to be developed from scratch. The upcoming releases of VS.NET code named Whidbey provides an infrastructure for portal based on which we can build on /enhances to the portal.

After going through the feature list of ASP.NET 2.0, one of the features that caught my eye was the introduction of Portal Development. If you look at the standard templates in VS.NET 2005, you will find a standard template for "ASP.NET Intranet Site" which is essentially used for developing Portals.

Inbuilt authorization and authentication, pre-user customization, common layout, dynamic menus based out of an XML sitemap file , Web parts and many more cool features have been bundled by Microsoft in this out of the box Portal solution in ASP.Net 2.0

Inclusion of Web Part framework in VS.NET 2005 has been one of the most anticipated and much needed features, which was missing in the past versions of ASP and ASP.Net. Web parts are all about personalization. It enables the user to personalize and modify the contents and layout. There are three basic ways we can create a Web Part viz. Use ContentWebPart Control, create a Web User Control or create a Custom Control. The simplest of the three is the ContentWebPart Control.

I will not dwell into the details of it since there is already a very nice article on msdn "Meet the Web Part Framework".


While Web Parts address the problem of displaying personalized content, there is still the issue of storing and retrieving the content to the Web Part. This is done by configuring a provider to store membership/personalization data. The easiest way is to use the Web Site Administration Tool bundled in VS.NET 2005. This tool provides the means to configure Personalization and Membership features. Personalization allows one to store profile information about users of an application in a persistent data store. Personalization also can integrate with membership services to provide a unified solution for user management, login and profile information storage. Currently built-in providers for Access and SQL Server are available out of the box for Personalization and membership. In addition to that one can create their own custom providers too. The implementation details of this can be found at the following msdn article "Get Personal with ASP.NET Whidbey"


Normally Personalization works because the user has logged in and hence his/her stored preferences can be retrieved and applied to the web page. But sometimes we need users to browse the site and later sign in as is the case with typical e-commerce applications wherein user browses the catalog and when he/she wants to make the payment, the user is redirected to login page to sign in and authenticate the user. ASP.NET 2.0 supports this kind of behavior through "Anonymous Personalization". By default this feature is disabled.

Now let's dwell a bit into membership features in ASP.NET 2.0. Prior to 2.0 there were 3 modes of authentication viz. Windows Authentication, Microsoft Passport and Forms Authentication. Implementation details pertaining to authentication and data store for credentials were left to the Developers to code. Membership features greatly reduces the amount of code to be written by the developer. An inbuilt UI has been provided to configure membership details like authentication, password recovery, login etc. All the settings set in the Membership wizard is written to Web.config by the wizard for that site.

With inbuilt support for Portal development, lot of time can be saved by harnessing these features thereby reducing time and effort to build portals right from scratch. The new security controls make authentication a breeze and web parts provides the user the means to customize content. Personalization and Membership features give developers a ready made framework for personalizing the site to suit individual user needs.

Similar Articles