Installing ASP.NET Membership, Roles and Profiles support in SQL Server

by chris.fulstow 2/22/2008 7:07:00 PM

Here are are a few quick tips if you're using the ASP.NET Application Services with SQL Server, like Membership, Roles, Profiles, Personalization or Web Events.

These built-in "building-block" services have SQL provider implementations in .NET that let you use a SQL Server 2000 or 2005 database as their data store.  These are the framework classes that implement the SQL Server providers:

ASP.NET SQL Server Registration Tool

Adding support for these providers to your database is easy, just run the ASP.NET SQL Server Registration tool from the command-line (aspnet_regsql.exe) to launch the ASP.NET SQL Server Setup Wizard.  This will guide you through the process with a simple GUI:

> cd C:\Windows\Microsoft.NET\Framework\v2.0.50727
> aspnet_regsql.exe

By default, the wizard installs all five services: Membership, Roles, Profiles, Personalization and Web Events.  However, if you need support for only some, say just Membership and Roles, then aspnet_regsql can be run from the command-line with specific options, for example:

> aspnet_regsql -S MySqlServer -E -A mr -d MyAspDatabase

This installs the Membership and Roles services (-A mr) on server MySqlServer in database MyAspDatabase using current Windows credentials for authentication.  To see a full list of command-line options and switches, run the registration tool with the help flag:

> aspnet_regsql.exe /?

There's also an option to generate just SQL scripts without executing them, and another to remove services from the database that aren't used or needed anymore. (You can also manage SQL cache dependencies and session state using this tool.)

For more info about ASP.NET SQL providers:

Powered by BlogEngine.NET 1.3.0.0
Theme by Mads Kristensen

About the author

Name of author Chris Fulstow
ASP.NET Contractor, Sydney

E-mail me Send mail

Calendar

<<  November 2008  >>
MoTuWeThFrSaSu
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

View posts in large calendar

Pages

    Recent comments

    Categories


    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2008

    Sign in