Bronzato
Bronzato

Reputation: 9342

Do I need to customize membership provider?

I'm building a new Asp.Net MVC3 solution and would like to have all the tables in the same database (including membership, users and roles tables). So I don't want to have a separate aspnetdb.mdf file. I think I only have to adjust membership section in Web.config (connectionstring) in order to point to my unique database. Right? Please correct me if I'm wrong. So until now, no need to customize the membership provider.

Second question: can I name my table for managing users (membership) the way I want without customizing the membership provider or do I have to customize it? I think I have to customize the membership provider if I change the user table name. Correct?

Thanks.

Upvotes: 3

Views: 110

Answers (2)

tugberk
tugberk

Reputation: 58454

You certainly doesn't have to implement your own provider (I mean you can if you want but I cannot see a reason).

I would create a blank database and then fill it in with the Membership database schema via aspnet_regsql.exe tool. Here is a great blog post on that:

Installing ASP.NET Membership services database in SQL Server Express 2008

Then, build your own tables, UDF, SP on that same database. You will end up with one databse at the end.

Point your membership provider to that database and you are good to go.

Upvotes: 1

dknaack
dknaack

Reputation: 60496

Description

It looks like you have to implement your own MembershipProvider and MembershipUser. That sounds harder than it is. You can implement your own logic, own data access and more. This i also i good thing to learn how ASP.NET handles authorization.

More Information

Upvotes: 1

Related Questions