Howto: ASP.NET Membership and Roles using SQL Server
In this short guide, I’ll show how to use a dedicated SQL Server for the Membership and Roles part of ASP.NET. Normally the membership and roles uses the local SQL Express Server and a aspnetdb in the local app_data directory of the webserver. But for many reasons (one of them central backup) I have always wanted to be able to use my existing SQL Server (in my case SQL Server 2005).
1) Create a new database on your SQL Server to hold the membership and roles.
2) In my case I’ll create a new ASP.NET website to use for this demo. The website will be called "demo_membership".
3) Populate the database you created with the membership tables. For this, you’ll use the program aspnet_regsql located in: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 – doubleclick to launch.
If you expand the database – you should see the membership/roles tables:
The database is now reade for use.