如何实现与SimpleMembership角色管理器上的ASP.NET MVC 4 [英] How to enable Role Manager with SimpleMembership on ASP.NET MVC 4

查看:201
本文介绍了如何实现与SimpleMembership角色管理器上的ASP.NET MVC 4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道如何使用包含在ASP.NET MVC 4中的 SimpleMembership 系统中的角色管理器功能,特别是如何建立一个控制器,管理相关的所有数据与角色,并使用 webpage_Roles SimpleMembership 当一个项目与互联网创建的模板创建。有没有办法登录内/自动执行此注册在的AccountController行动?

I'm wondering how to use the Role Manager feature with the SimpleMembership system included in ASP.NET MVC 4, specifically how to build a controller that manages all data associated with Roles, and using the webpage_Roles table that SimpleMembership creates when a project is created with a Internet Template. Is there a way to automate this within the Login/Register actions in the AccountController?

推荐答案

好吧,我是在ASP.NET MVC4但我已经给自己定了一个任务的专家,我想创建基于角色的站点访问。

Well, I am no expert on ASP.NET MVC4 but as a task I have set for myself, I wanted to create Role Based site access.

ASP.NET MVC4是一个很好的资源!我做对缺乏信息,难以实现在MVC4角色的投诉。

ASP.NET MVC4 is an excellent resource! I do have complaints about the lack of information and difficulty to implement Roles in MVC4.

要实现一可以实现SimpleMembership和SimpleRoles任务。请参阅下面的链接:

To achieve the task one can implement SimpleMembership and SimpleRoles. See the below links:


  1. 使用SimpleMembership随着ASP.NET网页由Matthew M.奥斯本

  2. SimpleMembership,会员供应商,环球供应商和新的ASP.NET 4.5 Web Forms和ASP.NET MVC 4模板由乔恩·加洛韦

  1. Using SimpleMembership With ASP.NET WebPages by Matthew M. Osborn
  2. SimpleMembership, Membership Providers, Universal Providers and the new ASP.NET 4.5 Web Forms and ASP.NET MVC 4 templates by Jon Galloway

以上两个链接解释了很多,有一些非常基本的code例子可惜的解决方案下载不是第一个URL可用。

The above two links explain a lot and have some very basic code examples but unfortunately the solution download is not available in the first URL.

在除了上述


  1. 按thangchung >
  2. ASP.NET MVC 4样品上 MSDN

  1. Customize the SimpleMembership in ASP.NET MVC 4.0 by thangchung
  2. ASP.NET MVC 4 Sample on MSDN

这最后一篇文章将进入一个更好的细节,也给来源$ C ​​$ C细读。

This last article goes into a much better detail and also gives source code to peruse.

这篇关于如何实现与SimpleMembership角色管理器上的ASP.NET MVC 4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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