Reputation: 532
I've got new MVC ASP.NET app on bootstrap with login/register script and it works ok, but I don't know where is default database for this app. My App_Data folder is empty. Can somebody tell me where the data from form registration are saved.
Upvotes: 15
Views: 16169
Reputation: 1460
Here is something in case you can't see the DefaultConnection and AspNet tables in Server Explorer: You need to register a user at least once to get these tables created or at least to show.
Upvotes: 2
Reputation: 3520
This will stored under Sql express that came along with visual studio 12,13 &15.
You can connect it using server explore under View - > server Explorer
Upvotes: 8
Reputation: 23
Normally we connect our model or DAL to a databases like Sql Server or MySQL etc. But as per you question i understood that just you are using a visual studio built-in application. visual studio stores that data in localDB
Upvotes: 1
Reputation: 231
In your Web.config ,look for 'Connectionstring'
<connectionstrings>
<add name="ConnectionstringName" connectionstring="Data Source=DatasourceName;Initial Catalog=This_isDefault_db;Persist Security Info=True;User ID=ID;Password=pwd" providername="System.Data.SqlClient" />
</connectionstrings>
The catalog
attribute tells you which is your db.
Upvotes: 1
Reputation: 1989
Default connection string will be
<connectionStrings>
<add name="ApplicationServices"
connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
providerName="System.Data.SqlClient" />
</connectionStrings>
So it will be created in your app data. MDF file will be created. Though you can change the connection
Upvotes: 1