Question

I read the following quote from Jon Glaway:

SimpleMembership has been designed as a replacement for the previous ASP.NET Role and Membership provider system

Can someone clarify if this is correct. I do understand that simple membership gives me the ability to store more information in a simple UserAdmin table with two columns but does it "replace the ASP.Net Role system also? I thought to implement roles I would still need to set these up in much the same way as before.

For example is the following not working in both the old and new SimpleMembership:

Roles.CreateRole("Administrator");
Was it helpful?

Solution

Yes it replaces the role system a well. Simply create a new role entry in your database table.

With that said you CAN still use the old membership system. The new one lacks many features and it meant to be as the name says ... Simple.

The web forms templates for 4.5 don't use simple membership at all so it's up to you.

I prefer simple membership as you deal with the tables directly for the most part. Simple membership has also been around for a couple years as part of webmatrix which is where you'll find the references point to.

OTHER TIPS

This article http://weblogs.asp.net/jgalloway/archive/2012/08/29/simplemembership-membership-providers-universal-providers-and-the-new-asp-net-4-5-web-forms-and-asp-net-mvc-4-templates.aspx will help you understand more on the differences between the two. You will also come to understand that simple membership is an improvement(upgrade) of the former

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top