Where is the database for the built in user part of asp.net MVC2?
User registration/authentication seems to be built into MVC2 but where does is the database that stores the users? It's not under data connections.
The database is first created when you create the first user for the website. After that the .mdf file is in app_data folder.
If you want it to be shown in VS, you can click Project -> Show all files and then it should be visible in Solution Explorer. Right click ASPNETDB.MDF and click Include in project.
The default template uses SQL Express edition. An aspnetdb.mdf file will be stored in the App_Data directory. Look at the connection string in web.config:
<connectionStrings> <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /> </connectionStrings>
u don't have to use aspnet_regsql.exe tool - just start your app, register new user, and then open the app_data directory in windows explorer - u will find your db file over there