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

戏子无情 提交于 2019-12-03 04:23:00

问题


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


回答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




回答2:


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




回答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.




回答4:


There's also this article on 4guysfromrolla

Download link: source code




回答5:


Found one here for asp.net mvc, but charged at Euro 30 




回答6:


Add to the list SecurityGuard.

http://www.mvccentral.net/Story/Details/tools/kahanu/securityguard-nuget-package-for-asp-net-membership



来源:https://stackoverflow.com/questions/2200167/admin-pages-to-manage-asp-net-membership-provider-role-management

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!