Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hey!
i am using asp.net 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

you need to create Membership Schema for your own database.
Please follow these link:
Create asp.net 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.
 
Share this answer
 
v2
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.

http://www.shiningstar.net/ASPNet_Articles/SqlMembershipProvider.aspx[^]
 
Share this answer
 
v2
Comments
ali_heidari_ 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?
bbirajdar 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
bbirajdar 15-Jul-13 2:29am    
www.connectionstrings.com

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900