Starting ASP.NET Forms Authentication

淺唱寂寞╮ 提交于 2020-01-09 11:01:51

问题


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.


回答1:


aspnet_ tables are part of SQL membership Provider implementation. Forms authentication works on top of Membership Provider.

Here are some articles

  • Use Forms Authentication with SQL Server in ASP.NET 2.
  • Membership, Roles, and Profile

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.




回答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 :




回答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



来源:https://stackoverflow.com/questions/7138684/starting-asp-net-forms-authentication

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!