Skip to content

John Bennett's blog

WCSF module to manage Membership, Roles and Profiles

Monday, March 12, 2007

This is a simple module to manage membership users, roles and profiles, built using the Web Client Software Factory. To use it, you must have a database configured for use with ASP.NET 2.0 SqlProviders for Membership, Roles, and Profiles. You don’t need to have the WCSF installed.

  1. Unzip the file
  2. Open the solution Jtbennett.UserManagement.sln in Visual Studio 2005.
  3. Hit F5 to start the sample website.
  4. The web.config files assume you have a user named “Admin” in a role named “Administrator”. If you do not, you can click the link at the bottom of the login page to create the user and role.

The module allows you to create/edit/delete membership users; create/delete roles and add users to those roles; and view/edit profiles. Since it is built with the WCSF, it uses the Model-View-Presenter-Controller pattern (MVPC). I’ll be adding validation controls and unit tests soon. It’s very bare bones right now. For example, there is no confirmation dialog when you Delete a user or a role — so be careful!

There are two profile properties declared in web.config: Foo and Bar, just so there are a couple of editable Profile properties to start with. You can replace those with any properties of your choosing. In this version, nested properties are not supported, but I hope to add that support soon.

I hope this is the first of several modules that will make up a full-featured website admin tool. Please let me know if you find it useful or have suggestions for additional modules.