Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 734
aknuds1 Avatar asked Aug 04 '12 13:08

aknuds1


People also ask

How can we implement membership provider in ASP.NET MVC?

Let's create a application for membership provider ASP.NET MVC. Step 1: Go to visual studio and click on new project -> a window will open from here select a 'ASP.NET MVC4 web application' and give the name for this project in my case I give it as “MVCMembershipProvider ".

How can I use ASP net membership provider?

The ASP.NET membership provider is a feature that enables ASP.NET developers to create Web sites that allow users to create unique user name and password combinations. With this facility, any user can establish an account with the site, and sign in for exclusive access to the site and its services.

What are the 3 main components of an ASP.NET MVC application?

The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model, the view, and the controller. The ASP.NET MVC framework provides an alternative to the ASP.NET Web Forms pattern for creating MVC-based Web applications.


1 Answers

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.

like image 178
Garrett Fogerlie Avatar answered Oct 09 '22 12:10

Garrett Fogerlie