databases and login with ASP.net
I've started writing an application with a SQL database that I called TheDB.mdf. In the app data folder there's also another file called ASPNETDB.mdf. What does this second file do? I imagine it's created by the framework; is it ok to have my application built like that? Will it be a problem when I go to deploy on a server at a hosting 开发者_StackOverflow社区service? I'm starting with the Login control; where is the user information stored?
Thanks for your patience; I'm new to the framework. Suggestions and advice welcome!
aspnetdb.mdf stores the user information for the default Forms Authentication Membership Provider that is provided by the framework.
It's fine to leave there but you can also add the tables to your database and modify your connection strings or implement a custom table structure and write your own Membership Provider for Forms Auth.
ASPNETDB.mdf is where the user information is stored. It is ok to have this database along-side your application database.
You can add the same data-structures found in this database to your own database using aspnet_regsql.exe found in c:\windows\microsoft.net\framework\vXXXXX\
精彩评论