How should I manage membership in my ASP.NET MVC 4 app?

不想你离开。 提交于 2019-12-21 16:19:55

问题


As I'm in the process of creating my first ASP.NET MVC 4 Internet application, I'm wondering how to best manage membership on the site. The app allows users to register and log on. I'm interested in finding out how to implement a complete solution for managing site membership, including an administrative user interface.

How should I go about adding membership administration facilities to my app? I'm primarily considering two different NuGet packages to base my solution on, SecurityGuard.MVC4 and MvcMembership. Both look like a good starting point for adding membership administration to my app, but I'm finding it difficult to choose as I know so little on the subject.


回答1:


I believe Security Guard is what you would want to go with. It gives you a much more complete membership area. I haven't used either myself, however I have made my own, and looking through the links you provided, Security Guard is your best choice for creating an Admin backend.

However if you just need to authorize different sections, check user roles, and perhaps unlock a user, you could probably get by using the built in User and Mebership and Role methods. You would have to create some views and what not but it's not very hard and a good learning experience.



来源:https://stackoverflow.com/questions/11808985/how-should-i-manage-membership-in-my-asp-net-mvc-4-app

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