To create a new ASP .NET MVC web application that contains user authentication code
- In the File menu of Visual Studio select New, Project…
- On the left select Visual C#, Web, and in the middle select ASP.NET Web Application (.NET Framework)
- Enter the Name, select the solution folder location and click OK. The solution name will automatically match the value of the Name field.
- Select MVC and click the Change Authentication button
- To use your database for authentication select Individual User Accounts
- Make sure the correct authentication is selected and click OK
This ASP.NET MVC 5 web application automatically creates an SQL Express internal database in the App_Data directory of the application when you register the first user.
- Start the application
- Click Register in the menu of the web application
- Register a user
To use an external database for user authentication, see the next post at Configure the ASP.NET MVC 5 web application to use an external database for user authentication