問題描述
有沒有標準的asp.net認證授權登錄系統? (Is there a standard asp.net authentication authorization login system?)
Besides what it comes with in 2.0 (the generated aspnetdb.mdf), is there a standard login authorization authentication system for asp.net Internet websites? One that can plug into a website.
參考解法
方法 1:
You can use aspnet_regsql.exe to create the required tables/sprocs/views in any sql server db of your choosing. Once you've added the proper connection string and membershhip configuration, you can use all of the membership stuff that was added with .net 2.0
4 Guys has a pretty good tutorial on how to implement the membership system, and they cover using aspnet_regsql.exe.
方法 2:
"the generated aspnetdb.mdf" is the ASP.NET Membership model. You can use it in websites without the generated aspnetdb.mdf.
From an article in MSDN called Introduction to Membership:
ASP.NET membership gives you a built-in way to validate and store user credentials. ASP.NET membership therefore helps you manage user authentication in your Web sites. You can use ASP.NET membership with ASP.NET Forms authentication or with the ASP.NET login controls to create a complete system for authenticating users.
See my answer and comments here, too.
(by johnny、Jimmie R. Houts、eKek0)