C# 的角色/权限框架?
有谁知道一个好的框架可以让我针对用户设计权限和角色。
基本上允许我自动检查用户可以做某件事,然后禁用或启用菜单项等
我并不是真正在寻找asp.net安全性......因为我需要在我自己的服务层和客户端都使用它并且 WPF 将使用它。
我希望有一些东西可以让我针对用户创建新的角色和组,然后检查用户或组拥有什么类型的权限。
任何帮助真的很感激。
我确信某种开源框架是可用的,嗯,我希望不必创建我自己的
谢谢
Does anyone know of a good framework to allow me design permission and roles against users.
Basically allowing me to automatically check a user can do a certain thing, and then disabling or enabling menu items etc
I am not really looking for asp.net security ... as i need to use it in my own service layer and clients both WEB and WPF will use it.
I was hoping for something that allows me to create new roles and groups against users and then check what type of permissions a user has or a group has
Any help really appreciated..
I am sure some kind of open source framework is available, well i was hoping not having to create my own
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
ASP.NET 会员资格
http://msdn.microsoft.com/en-us/library/yh26yfzy。 ASPX
ASP.NET Membership
http://msdn.microsoft.com/en-us/library/yh26yfzy.aspx
如果 ASP.NET 成员资格/角色提供程序(例如 SQL Server 提供程序)为您提供的功能足够,我建议您使用它们。您可以为 WPF 应用程序创建一个 Web 服务接口,该接口使用相同的提供程序来查询用户列表和角色。它们绝不仅限于“网络表单”。
即使您决定不使用内置提供程序,我建议您仍然通过创建自定义提供程序,通过 ASP.NET 的提供程序系统访问您自己的内容。这样,ASP.NET 中依赖标准用户/角色的任何内容都将“正常工作”。
If the features that ASP.NET membership/role providers (SQL Server providers for instance) give you are sufficient, I suggest you use them. You can create a web service interface for your WPF application that uses the same providers to query the user list and roles. They are in no way limited to "web forms" only.
Even if you decide not to use the built-in providers, I suggest you still access your own stuff through ASP.NET's provider system by creating custom providers. That way, anything in ASP.NET that relies on standard users/roles will "just work".