I’m starting to learn ASP.NET Forms Authentication, and I’m looking for a good article to help me start.
I’ve heard before that ASP.NET Forms Authentication uses a load of database tables preceeded with aspnet_, however any examples I’ve found don’t show this.
For example I think theres an aspnet_users table?
How can I generate these tables, and is this what I’m supposed to be doing?
Any tutorials I find just tell me about adding the authentication tag into the web.config.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
aspnet_ tables are part of SQL membership Provider implementation. Forms authentication works on top of Membership Provider.
Here are some articles
You can even roll out your own Membership Provider which uses your existing table.
The Examining ASP.NET’s Membership, Roles, and Profile series is a good starting point. It covers all the security part of ASP>NET.
Method 2
I would like to recommend the msdn articles :
- Forms Authentication Provider http://msdn.microsoft.com/en-us/library/ff647070.aspx
- Explained: Forms Authentication in ASP.NET 2.0 http://msdn.microsoft.com/en-us/library/9wff0kyh.aspx
here is the schema used :

Method 3
The following tutorial from asp.net is worth reading:
http://www.asp.net/security/tutorials/an-overview-of-forms-authentication-vb
Following is the msdn page explaining the Aspnet_regsql.exe command to create the aspnet database.
http://msdn.microsoft.com/en-US/library/ms229862(v=VS.100).aspx
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0