Click here to Skip to main content
15,893,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello everyone, i was working in built in database and accessing the register page in asp.net . so can i know where do i find the database so that i can see who are all the users registered and logged in .
Posted

It must be inside App_Data folder in your application. It may be as hidden file so first use "Show All Files" button in Solution explorer and then look inside App_Data folder.

One more thing....if you just created the ASP.NET application, by default database is not there. The Database will be created only when first time any user would register himself.

Even if not getting DB, then look into Web.Config....for myself I can see like:

add name="DefaultConnection" providername="System.Data.SqlClient" connectionstring="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-WebApplication1-20140223194834;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-WebApplication1-20140223194834.mdf"

The important value is: AttachDBFilename=|DataDirectory|\aspnet-WebApplication1-20140223194834.mdf".....Look into yours.
 
Share this answer
 
v4
Comments
kishorebt 24-Feb-14 0:43am    
no content in appdata
Snesh Prajapati 24-Feb-14 0:45am    
It may be as hidden file so first use "Show All Files" button in Solution explorer and then look inside App_Data folder.
Snesh Prajapati 24-Feb-14 0:47am    
I can send you screenshot if you are facing problem in getting the option. in that case just share your email.
kishorebt 24-Feb-14 0:49am    
kishorebt11@gmail.com
Snesh Prajapati 24-Feb-14 0:55am    
Sent a mail to you...Hope the screenshot will solve problem. If still issue persist look into http://stackoverflow.com/questions/14383234/visual-studio-2012-show-all-files-button-missing


One more thing....if you just created the ASP.NET application, by default database is not there. The Database will be created only when first time any user would registered.
Hi,

VS 2013 comes in-built with SQL Express. This link[^] should help you get started with it and will also answer where the file can be found.

If you just want to locate the mdf file then the default location is:
C:\Users\<yourusername>\Documents\<thenameyouhadchosen>.mdf

Hope this helps.

[Please accept/up-vote answers or solutions that work for you to encourage participation]
 
Share this answer
 
v3
Comments
kishorebt 24-Feb-14 0:43am    
what ever the link uve given is to creation of database. im not looking for that, for example i am working on built in register page ,so i wanted to know who are all the users registered from backend (database).
CoderPanda 24-Feb-14 0:47am    
What does your data connection show (in Server explorer)? Are you using the local DB? Are you connecting to an external DB instead?
kishorebt 24-Feb-14 0:52am    
try out selecing a new web project and run that code. ull find a login and register page. so i want to access the database of it
CoderPanda 24-Feb-14 0:56am    
Have you tried the ideas given by me and Snesh yet?
kishorebt 24-Feb-14 1:02am    
ya tried out but no result :(

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