0

I have been using ASP.NET Roles/Membership classes and associated methods in ASP.NET Website application. Where I have configured ASP.NET membership database. With this database, I am able to use all those methods associated with Membership and Roles classes. In this website, I used to do CRUD operations on Roles and Membership entities.

In similar way, I am trying to create another website in ASP.NET where I am required to create and use SQL database and tables inside (using SQL Server Management Studio) to imitate same functionality doing CRUD operations what I used to do in previous case using Roles and Membership classes' methods. To give more clarification, here is a scenario I am trying achieve :- Have one table with 3 columns : 1. Dealer Id 2. Dealer Name 3. Role (i.e. Administrator, Executive etc.)

Can anybody advise/suggest or share an opinion whether and how we can apply these Roles and Membership classes' methods on user defined SQL tables.

Binoy
  • 390
  • 5
  • 19

1 Answers1

0

I figured that out.

STEP 1: I did research and found below command line tool to replicate/imitate ASP.NET Membership database & relevant tables within MS-SQL Server database. Browse through below path to set the prompt and find an .exe aspnet_regsql.exe.

Once found, run it in below manner. C:Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regsql.exe

It will further prompt you with SQL database setup wizard. Select the database, set the credentials (i.e. Server name, user name, password). It will replicate whole membership database structure in your database.

STEP 2: in the next step, copy below configuration in your Web.Config file replacing existing and attribute.

After observing above steps, existing Roles &/or membership classes and their methods can be used as they are.

Binoy
  • 390
  • 5
  • 19