Help me decide whether to use ASP.NET's default membership / role providers or create my own providers

I spent a good part of yesterday reading on this subject and still feel that I am not sure where to go. I come from "minimize my" background when it comes to authentication and authorization. We never used Forms authentication, let alone a member API. If we look at our old code, we will use session variables to capture / control whether the user will be registered, etc. With this new project that I am going to undertake, I want to get us back on track with what we had to do for a start, using the tools provided by the framework.

I already have a database schema with which I will work, but it is not installed in stone; I can make changes to it if necessary. There is already a Users table in this scheme, an integer is used as the primary key. This table also has other information, such as first name and last name. I also have UserId-based foreign keys for other tables such as Phone and Address. Below I outline some of the pros and cons that come to mind.

Default provider

Arguments

  • Less code.
  • The ability to use all the server controls associated with it, such as Login, ChangePassword.

against

  • . , CreateUserWizard, , ​​ , . , .
  • (Phone, Address) UserId, GUID .
  • ; . - TransactionScope, , .

  • .
  • / .

  • / .
  • - , .

, , , , .

.

+5
4

.

db . db dbo "aspnet_" "vw_aspnet" .. . , aspnet_regsql.exe, .

, Pro ASP.NET MVC 2 Framework:

... SqlProfileProvider , /, , .

, API - , ​​ ASP.NET, SQL .

( , Azure Table), , , .

+2

, asp.net . . , . , .

+1

SqlMembershipProvider , Oracle. , GUID ( , ). , !

Oracle, / / ( GUID). , "" , Oracle - . , try/catch, .

, - , . , , .

. , , . , . API .

+1

, . .

In the past, you might want to do something yourself, but there is currently no reason for this.

I think that if you tried to write it yourself, you would recreate the wheel, and it would take too much time and resources to fix it. Especially when it comes to security.

0
source

All Articles