2

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.

Curtis
  • 101,612
  • 66
  • 270
  • 352

3 Answers3

7

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.

Eranga
  • 32,181
  • 5
  • 97
  • 96
3

I would like to recommend the msdn articles :

here is the schema used : here is the schema used

sohaibafifi
  • 745
  • 7
  • 16
1

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

Waleed Al-Balooshi
  • 6,318
  • 23
  • 21
  • Cheers @Waleed. I've already checked this link but all they say about users/password storage is: `Dim users() As String = {"Scott", "Jisun", "Sam"} Dim passwords() As String = {"password", "password", "password"}` I was hoping for more database structure help – Curtis Aug 21 '11 at 14:09
  • @Curt The aspnet_* databases for the membership, roles, and profile providers are created automatically for you when you start using the providers and the controls that use those providers. Otherwise, you can use the aspnet_regsql.exe to create the databases manually. – Waleed Al-Balooshi Aug 21 '11 at 14:38