ASP.NET custom role management

徘徊边缘 提交于 2019-12-05 21:43:12

Sounds like you need the SqlRoleProvider.

You can also plug in your own custom Role Provider (and Membership Provider). See How to: Sample Role-Provider Implementation

I faced the same problem and solved it by integrating the SecurityGuard NuGet package. It has pretty nice user interface and allows you to manage users as well as roles.

Just following the guide at the following link: http://www.mvccentral.net/Story/Details/tools/kahanu/securityguard-nuget-package-for-asp-net-membership

Nix

Here is a guide with code to doing the role manager UI: MSDN article.

Have you seen this Web Admin tool?

It looks like this:

So that client can add users / manage roles after development is over.

Alex, I had exactly this problem on an application a couple of years ago and I found and adapted this sample:

Microsoft ASP.NET 2.0 Member/Role Management with IIS, Part 2: Implementation

There was a slight bug in the ToggleInRole_Click method that I had to tweak (I can give you my fix if you want) but apart from that it worked well.

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