15

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.

1
  • What is your version of visual studio ? and MVC app version ? Commented May 29, 2015 at 11:19

5 Answers 5

8

enter image description here

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

Sign up to request clarification or add additional context in comments.

Comments

2

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.

Comments

1

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

Comments

1

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.

Comments

1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.