A Quick User & Role Management Solution

In the last few days I have played a lot with the version control system git. I’ve worked on a user and role management solution on GitHub for smaller and maybe medium sized ASP.NET MVC projects.

I wanted to have something which is pluggable into any other future project without duplicating this (boring) code over and over again.

My solution for that consists of two parts. One the one hand there is a static helper class which generates all the html, css and JavaScript code needed for the user interface. On the other hand there is an external controller, which provides all the role and user account data requested by the client.

The user interface is divided into 3 parts: The user accounts as a sortable table, a form for creating new user accounts and a form for managing roles.

If you are tired of reading yet just watch the demo application at AppHarbor:


  • Paged user list by using mottie’s tablsorter fork and pager plugin (included in MyHtmlHelper)
  • Create / delete user accounts
  • Create / delete roles
  • Manage roles for users
  • Client-side success and error messages
  • Custom user authorization possible
  • Any membership or roleprovider can be used

+ Unlocking user accounts

There are some points though you need to know before trying out:

  • The user table is loaded at once which is a bad idea for > 1000 users ?!
  • All data is rendered on the client through JavaScript, which is no showstopper if you know the admin’s browser settings.

If you are currently starting a new project, it might be a simple and quick solution for you. You can still mess around with an advanced system when your project grows.

The full source code including the demo application is available at GitHub:


  1. Bisher keine Kommentare.
(wird nicht veröffentlicht)