ASP.NET Identity vs Simple membership Pros and Cons?

@Roman references some good articles that looks at the pros and cons of ASP.NET Identity and the membership provider model. ASP.NET Identity gets away from the membership provider model, which I believe is a good thing. There are some definite problems with Simple Membership when you wanted more advanced security features and if it was … Read more

SimpleMembership with custom database schema in ASP.NET MVC 4

I asked the same question to the product team. The design goal of SIMPLE membership was to work out-of-the box as simple as possible. So really there’s no customization possible as far as the tables are concerned. The recommended workaround is, to still use ASP.NET Membership (SqlMembershipProvider).

How to create custom additional fields in UserProfile in MVC4

Elaborating from the answer above The WebSecurity.InitializeDatabaseConnection Method help states that If you want to use a database table that contains user profile information (user names, email addresses, and so on), you specify a connection string and table name that the membership system uses to connect to that information. If you do not want to … Read more

How am I supposed to use ReturnUrl = ViewBag.ReturnUrl in MVC 4

When using forms authentication and the user is not authenticated or authorized the ASP.NET security pipeline will redirect to the login page and pass as a parameter in the query string the returnUrl equal to the page that redirected to the login page. The login action grabs the value of this parameter and puts it … Read more

Role based authentication in the new MVC 4 Internet template using simplemembership

Found an answer here by Mehdi Golchin which seems to take care of: [Authorize(Roles=”admin,editor,publisher”)] If I also add this to the home controller: [InitializeSimpleMembership] Because this attribute is on the Accounts controller, SimpleMembership database gets initialize only after the first use of the accounts controller like login/register. Even when the current user gets logged in … Read more

How do I use my own database with SimpleMembership and WebSecurity? What is MVC4 security all about?

See the summaries below each quote for a quick answer, and the paragraphs for detail. Also see the References section at the end for the authoritative sources. Summaries 1.What is SimpleMembership/SimpleMembershipProvider (WebMatrix.WebData) and what is it/are they responsible for? SimpleMembership (a term that covers both the SimpleMembershipProvider and SimpleRoleProvider) is responsible for providing a clean … Read more

Is ASP.NET MVC 5 incompatible with the WebMatrix SimpleMembershipProvider?

WebMatrix is compatible with MVC 5. What I did was to take an empty MVC 5 project and incorporate WebMatrix SimpleMembershipProvider into it using SimpleSecurity, an open source project that decouples SimpleMembership from your MVC application. So far I am able to create the database, seed it, and log in and out. I plan on … Read more