RSS

Creating ASP.NET Membership in SQL (Web Forms and MVC)

13 Jul

ASP.NET Membership is Microsoft approach to provide security, authentication and authorization in that regards, for ASP.NET Web Forms and ASP.NET MVC. Both Web Forms and MVC can utilize this feature through Forms Authentication approach.

There are several ways to create Membership database in SQL Server.

SQL Server Registration Tool (Aspnet_regsql.exe) – Wizard

%WINDIR%\Microsoft.Net\Framework\<.net version>\aspnet_regsql.exe

Running this tool will guide you to installing ASP.NET Membership in SQL Server.
See the ASP.NET Membership Tutorial on “Installing the Application Services” section for more instruction.

SQL Server Registration Tool (Aspnet_regsql.exe) – Advanced Options

Beside the wizard guide, you can also use its command prompt with many available options.
See MSDN site for the parameters.

SqlServices.Install Method

To programatically install ASP.NET Membership, use SqlServices.Install method.

SQL Scripts Manual Approach (for Deployment Plan)

Generate sql script with SQL Server Registration Tool (Aspnet_reqsql.exe) to include them in a database project as part of deployment strategy.

%WINDIR%\Microsoft.Net\Framework\<.net version>\aspnet_regsql.exe -sqlexportonly <filename.sql> -A all

SQL Scripts Manual Approach (for Deployment Plan) – Individual Scripts

In the following folder, you will find many .sql script files to install / uninstall ASP.NET Membership. Each service (or feature – Membership, Roles, Profile, Web Parts Personalization, Web Events) is separated by files. This also can be included in a database project as part of deployment strategy.

%WINDIR%\Microsoft.Net\Framework\<.net version>\

ASP.NET Membership Schema Diagram

Advertisements
 
1 Comment

Posted by on July 13, 2012 in General

 

Tags: , , , , , ,

One response to “Creating ASP.NET Membership in SQL (Web Forms and MVC)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: