SiHyung Lee
SiHyung Lee

Reputation: 349

How to set up role/membership objects in SQL Server database for ASP.net?

I usually create role/membership database using command:

aspnet_regsql.exe -S (local) -E -A all

but my current web hosting company only allows to create database using phpMyLittleadmin.

How can I manually create database for asp.net role/membership?

Upvotes: 1

Views: 1152

Answers (1)

marc_s
marc_s

Reputation: 754240

In the directory where your aspnet_regsql utility lives (dependent on the .NET framework version you use - probably something like C:\Windows\Microsoft.NET\Framework\v4.0.30319), there's a list of Install*.sql script files that will create the necessary tables for the ASP.NET membership and roles system.

InstallCommon.sql
InstallMembership.sql
InstallPersistSqlState.sql
InstallPersonalization.sql
InstallProfile.SQL
InstallRoles.sql
InstallSqlState.sql
InstallSqlStateTemplate.sql
InstallWebEventSqlProvider.sql

So basically you only need to figure out which script files exactly you need, and which sequence to run them in - and then just ship those (or upload those) to your site and then execute it there.

There's also the same files for uninstalling the tables and the other database objects from your database (called Uninstall*.sql).

Upvotes: 1

Related Questions