ASP.NET MVC成员资格角色 [英] ASP.NET MVC Membership Roles

查看:108
本文介绍了ASP.NET MVC成员资格角色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为ASP.NET成员一些澄清;请大家帮帮我吧。
我使用ASP.NET MCV 3框架,并打算使用ASP.NET成员资格用户和放大器;使用LDAP或SQL认证管理。

I need some clarifications for ASP.NET Membership; please help me with it. I am using ASP.NET MCV 3 framework and intending to use ASP.NET Membership for users & authentication management using either LDAP or SQL.

有关就我的理解到现在为止; ASP.NET成员资格是:

For what I've understood until now; ASP.NET Membership is:

[用户]有[作用]或[作用]有[用户]

[User] has [Role] or [Role] has [Users]

但在我的项目,我有一个更复杂的业务逻辑;在这里我需要这个层次结构下一层像

But in my project I have a more complex business logic; where I need this hierarchy to next level like

[用户]有[作用] - >有[任务]

[User] has [Role] -> has [Tasks]

所以,我可以动态分配/取消任务/权限到我的MVC控制器或动作;

So I can dynamically assign/revoke tasks/permissions to my MVC controllers or actions;

我打算开始使用会员与SQL提供比可能在以后我会切换到LDAP / AD。

I plan to get started with Membership with SQL Provider and than may be later on I'll switch to LDAP/AD.

我也AzMan的探索和NetSqlAzMan;他们看起来OK,解决错误,但它们的用法似乎有些奇怪; (而不是作为整齐ASP.NET成员;在这里,我们可以简单地使用注释角色/任务分配给控制器或它的作用

I've also explored AzMan and NetSqlAzMan; they look ok to resolve the error but their usage seems odd; (not as neat as ASP.NET Membership; where we can simply use annotations to assign roles/tasks to a controller or its action.

时的ASP.NET成员资格仅限于角色? &安培;没有任务/操作?
或者是有什么解决办法是什么?

Is ASP.NET Membership limited to Roles only? & no tasks/operations? Or is there any workaround for that?

我可以享受ASP.NET成员资格,并在相同的道路使用的简单性有一个角色下一级层次 - >任务 - >操作

Can I enjoy the simplicity of usage of ASP.NET Membership and on the same road have a next level hierarchy for Roles -> Tasks -> Operations.

任何帮助将大大AP preciated。

Any help would be greatly appreciated.

谢谢!

推荐答案

ASP.NET的成员资格提供程序只支持角色开箱。它不支持任务或操作。然而,它是相对容易的创建一个自定义角色提供满足几乎任何需要。

ASP.NET's Membership provider only supports roles out of the box. It doesn't support tasks or operations. However it is relatively easy to create a custom Role Provider to meet just about any need.

有关一个好的开始检查实现角色提供'在 HTTP ://msdn.microsoft.com/en-us/library/ie/8fw7xh74.aspx 。您还可以找到在 http://msdn.microsoft样本角色提供。 COM / EN-US /库/ IE / tksy7hd7.aspx

For a good start check out 'Implementing a Role Provider' at http://msdn.microsoft.com/en-us/library/ie/8fw7xh74.aspx . You can also find a sample Role Provider at http://msdn.microsoft.com/en-us/library/ie/tksy7hd7.aspx .

这篇关于ASP.NET MVC成员资格角色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆