ASP.NET 2.0 Roles and Memberships

ASP.NET's Role management and membership providers are really, really easy to use and configure (once you figure out how to set up the database)

This article from 4Guys really helped me set it up properly and now that its up its quite easy to port and use for other applications. The design of it actually lets you use one Database to manage security and roles for several applications.

The only unfortunate part about these Roles and membership things is that the default web controls (specifically LoginView) are not really scalable. If you plan on having an ever growing list of roles and users you may not want to use these types of controls and instead programmaticlly control access to pages and page elements (see gridviews / formviews). This can be done pretty easily with the use of a secured page base class that you can inherit from.

Anyways, check the article



Post a Comment

<< Home