How to create the ASP.NET Membership tables in your own database?

I never thought that transferring the built-in ASP.NET Membership tables to my own database is as easy as changing the default connection string.  Here are the steps:

1. Add a LINQ To SQL Class to your MVC Project.  Point your new class to your database by adding a table to the dbml file.  This will add a new connection string in your Web.config.

b1

2. Open the Web.config file and comment out the DefaultConnection item in the <connectionStrings> tag.  Cut and paste the newly created connection string and rename it as DefaultConnection.  Compile and run your project and register a sample user.

b2

Thats it!  Try opening your database using your the management tool and look for the newly created tables.

b3

If you find this blog helpful, you can make the donation by clicking the Paypal button below.

Advertisements
About

Software developer living in the Philippines.

Posted in ASP.NET
3 comments on “How to create the ASP.NET Membership tables in your own database?
  1. Sanjeev says:

    HI Harold, thanks excellent post.

    I have a question: Would this technique also work for the new ASP.NET Identity tables?

    Thanks.

    Sanjeev

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Author

Harold Glenn P. Minerva
Software Developer / Tech Enthusiast
Living in the Philippines

View Harold Glenn Minerva's profile on LinkedIn

Instagram

Software Engineer - Seasonal and Range Trading Software. Magenta Trader is a powerful stock market visualization software that increases your probability of trading success.

Software Architect and Founder - Easyfis.com is a multi-tenant cloud-based Software-as-a-Service (SaaS) business app that caters to micro, small and medium trading businesses.

CTO and Co-Founder - We give your company the leverage by providing innovative software solutions products such as Point-of-Sales (POS), Financial Information System (FMIS), Payroll and DTR (HRIS), and many more.

%d bloggers like this: