Admin pages to manage asp.net membership provider & Role management

21,455

Solution 1

I found this MembershipStarterKit From TroyGoode on github:

What is the Asp.Net MVC Membership Starter Kit?

The starter kit currently consists of two things:

  1. A sample website containing the controllers, models, and views needed to administer users & roles.
  2. A library that provides testable interfaces for administering users & roles and concrete implementations of those interfaces that wrap the built-in Asp.Net Membership & Roles providers.

Out of the box, the starter kit gives you the following features:

  • List of Users
  • List of Roles User
  • Account Info
  • Change Email Address
  • Change a User's Roles

It looks like it's based on MVC 2, and I'm not sure it works on anything else. You do have the code though, so it shouldn't be hard to re-use this in MVC 3 or Web Forms.

Update

In the mean time, I forked the project and updated everything to MVC 3 razor. I also packaged the views up into a Portable Area (mvcContrib).

You can find the fork here:

https://github.com/fretje/MembershipStarterKit

Solution 2

Peter Kellner has an older article that lays out how to do this, complete with source code.

Solution 3

Yeah, I have been working on cleaning up and fixing the built-in admin tool. You can run it standalone.

http://spikes.codeplex.com/releases/view/40655


WebAdmin is simply the built in ASP.NetWebAdministrationFiles application cleaned up with codebehinds to make customization and refactoring possible.

This is a precursor to a more comprehensive asp.net web administration application that will fold in a lot of the configuration concerns that have come about in the past 5 years and 3 .net versions.

Usage: Point WebAdmin at a site by specifying applicationPhysicalPath and, if relevant, the applicationUrl (virtual path) e.g. default.aspx?applicationPhysicalPath=C:\Projects\WebAdmin\WebApplication1\&applicationUrl=/

It is best if the identity running this application has elevated permissions. Thus it makes sense to launch it with the webdev server or cassini. If you plan to place it in IIS be aware that impersonation is used and configure the vdir accordingly.

Known Issues:

Have yet to track down all the possible cases of the "Invalid postback" exception. It is caused by a security hole closed sometime after the built in web admin files were written and have not been updated.

When you find one, go to that page and place this in the page directive: EnableEventValidation="false" and post it on the http://spikes.codeplex.com Issues tabe.

Solution 4

There's also this article on 4guysfromrolla

Download link: source code

Share:
21,455
Oleksandr
Author by

Oleksandr

Quintessential learner and programming newbie..

Updated on April 24, 2020

Comments

  • Oleksandr
    Oleksandr about 4 years

    Are there any open source projects that provide a front end to asp.net membership provider? Something like the one visual studio exposes through it configuration, but one that can be deployed on production.

    Examples of some of the functionality I would like to see in the front end is

    • Add users
    • Delete users
    • Reset password
    • Change roles.
    • Add roles

    Etc