ASP.NET 自定义角色管理

发布于 2024-08-30 13:29:02 字数 160 浏览 2 评论 0原文

ASP.NET中有角色管理功能 它适用于本地开发机器。

对于我们的项目,我们需要客户管理员能够创建新用户并管理他们的角色。 所以,基本上与 aspnet_regsql.exe 的作用相同。

问题是 我们应该开发自己的页面和表单还是使用一些现成的工具?

谢谢!

There is Role Management feature in ASP.NET
It works on local development machine.

For our project we need customers admin to be able to create new users and manage their roles.
So, basically same what aspnet_regsql.exe does.

Question is
Should we develop our own pages and forms or use some ready made tool?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

唯憾梦倾城 2024-09-06 13:29:02

我遇到了同样的问题,并通过集成 SecurityGuard NuGet 包解决了它。它具有非常漂亮的用户界面,允许您管理用户和角色。

只需按照以下链接中的指南进行操作即可:
http://www.mvccentral .net/Story/Details/tools/kahanu/securityguard-nuget-package-for-asp-net-membership

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

风吹短裙飘 2024-09-06 13:29:02

听起来您需要 SqlRoleProvider

您还可以插入您自己的自定义角色提供程序(和成员资格提供程序)。请参阅如何:示例角色提供程序实现

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

_失温 2024-09-06 13:29:02

以下是执行角色管理器 UI 的代码指南: MSDN 文章

您见过这个 Web 管理工具吗?

它看起来像这样:
替代文本

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:
alt text

嗫嚅 2024-09-06 13:29:02

以便客户可以在开发结束后添加用户/管理角色。

Alex,几年前我在一个应用程序上遇到了这个问题,我发现并改编了这个示例:

使用 IIS 进行 Microsoft ASP.NET 2.0 成员/角色管理,第 2 部分:实现

ToggleInRole_Click 方法中有一个小错误,我必须对其进行调整(如果您愿意,我可以为您提供修复)但除此之外它运作良好。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文