Archive for asp.net

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.

screenshot-20070617-114651-1074 screenshot-20070617-114712-1075

screenshot-20070617-114744-1076  screenshot-20070617-114752-1077

screenshot-20070617-114813-1078

If you expand the database – you should see the membership/roles tables:

screenshot-20070617-115022-1079

The database is now reade for use.

Read the rest of this entry »

Comments