I created a new MVC3 project in VS 2010. Made no changes and started the website, there is already a login and register page built in. Where exactly is my account being stored when I register an account if I have not setup a database anywhere?
Can anyone recommended a tutorial on MVC3 that is good for someone just diving into the web side of programming. Entity framework would also be good.
I can walk through the code to this point:
Membership.CreateUser(model.UserName, model.Password, model.Email, null, null, true, null, out createStatus);
But I can’t see into CreateUser so i’m not quite sure what that is doing, and where the user is being stored.
Thanks for all the help.
You can open up your projects web.config file and find the connection string near the top. That will tell you what database it points to. Your default should look something like:
which says to use SQL Express, and attach to the file aspnetdb.mdf inside your project. You will need to create this database, and use the aspnet_regsql command inside the Visual Studio 2010 command prompt. This will create your user tables and the required schema to use the ASP.NET Membership Provider, which is the authentication code you’re seeing by default.
The best tutorial is the Nerd Diner tutorial. It’ll walk you through everything from database models, form validation, authentication, controllers and viewmodels, etc.
Edited to add: This is the original Nerd Diner tutorial, and isn’t nearly as complex as what it has evolved to on the codeplex site. You might find the original a bit easier and still mostly relevant.