Click here to Skip to main content
12,554,442 members (84,108 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL-Server
i am using login control ... i made a sqlserver database and added to my project !
well have can i use my own database to login users! how can i do this?
as you know , login control is using ASPNETDB.MDF , but i want it use my own database! how can i do it? is it possible?
Posted 6-Aug-12 4:49am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

you need to create Membership Schema for your own database.
Please follow these link:
Create membership database schema in SQL Server[^]
ASP.NET Membership - Part 1[^]
Installing ASP.NET Membership services database in SQL Server Express 2008[^]

I hope it will help you.
Best of luck.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Open the Visual Studio command prompt and execute the command "aspnet_regsql" . This will start a wizard which will guide you through the database and you can generate all the Membership tables and stored procedures into the database of your choice. You can then delete the aspnetdb.mdf from the App_Data folder.[^]
source.compiler 6-Aug-12 12:50pm
well, how can i connect my database to login control?
Muhamad Faizan Khan 12-Jul-13 2:16am
really fine solution i have add aspnetDB table by that wizard you suggested. now the question is can i use login Controls with that database which is present in server managment?? when we use login control Visual Studion automatically add file base aspnetDB.mdf and makes all adjustment automatically . SO what is extra work i need to do?
aspnet -i 12-Jul-13 5:42am
Nothing. The login control will use the database specified in the web.config connection string
Muhamad Faizan Khan 13-Jul-13 0:23am
simple string ? that we use. or some thing change
aspnet -i 15-Jul-13 2:29am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.161021.1 | Last Updated 6 Aug 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100