ASP.Net Membership Providers
This explains how to install the ASP.Net Membership Providers on your SQL 2005 database. You will need the Membership Providers installed on your database to use the ASP.Net 2.0 Login control.
To generate the script:
On your computer, open the ASP.Net command line and enter:
aspnet_regsql.exe -A all -sqlexportonly runproviders.sql
That generates the basic script for you, and puts into a file called runproviders.sql. Open that file and use the "Edit | Replace" feature of your text editor to replace every instance of "aspnetdb" with your own database name.
Connect to your SQL server and click the "New Script" button in SQL Server Studio, paste the script into the script text editor, and run it.
( *Note: you can also run the script directly from the command line against your remote SQL intance by setting the flags to your server, database, user name and password. Complete details about the command line flags can be found at http://msdn2.microsoft.com/en-us/library/x28wfk74.aspx. )
That has created all your Roles, which you can see under the "Security | Roles" part of your database.
Last part is to give your user account access to the roles with the following script (replace "YourUser" with your database user name), and run this little script. Then you are done with setting up SQL Server 2005 for the ASP.Net 2.0 Providers.
Exec sp_addrolemember 'aspnet_Membership_FullAccess', 'YourUser'
go
Exec sp_addrolemember 'aspnet_Personalization_FullAccess', 'YourUser'
go
Exec sp_addrolemember 'aspnet_Profile_FullAccess', 'YourUser'
go
Exec sp_addrolemember 'aspnet_Roles_FullAccess', 'YourUser'
go
Exec sp_addrolemember 'aspnet_WebEvent_FullAccess', 'YourUser'
go
[ 11/19/2006 ]