简体   繁体   中英

ASP.NET User/Role Editor

Is there a standard object I should use to edit Users and their Roles in ASP.NET? Or should I role my own?

This is one is fairly feature rich and well documented...

http://mywsat.codeplex.com/

What about following classes

EDIT: The Roles framework's functionality is exposed via the Roles class, which contains thirteen static methods for performing role-based operations.

CreateRole and DeleteRole methods will do the job.

Reference : http://www.asp.net/learn/security/tutorial-09-cs.aspx

如果您需要自定义的内置功能实现,可以根据需要进行修改,可以在此处找到

There is a built-in web site administration tool that works well locally: http://www.developer.com/net/asp/article.php/3569166/Configuring-Your-ASPNET-20-Site.htm . This shows an IIS administration tool, but I have not used that so I don't know how well it is. But that again would require logging into the server.

For our app, we built our own because we needed something more robust anyway, at least for the users/roles part. I haven't seen anything personally. You could try checking out the codeplex.com site, I remember seeing some things in the past, but never researched/experimented.

HTH.

Use the standard Membership and Role providers framework for the backend. There are two out-of-the box Membership providers that handle authentication against the DB or Active directory (SqlMembershipProvider and ActiveDirectoryMembershipProvider). There are a couple of out-of-the box Role providers as well (SqlRoleProvider, AuthorizationStoreRoleProvider, and WindowTokenRoleProvider).

For the front-end, the Logon controls are standard and interact well with the Provider framework...but only for login and changing passwords.

To my knowledge however, there are no standard GUI controls or wizards that have out-of-the box functionality for editing and administering users. You'll have to roll your own pages for that.

我写了几个自定义的aspx页面。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM