0

我正在使用Asp.Net/C#Visual Studio 2008构建一个应用程序。现在我想为我的应用程序创建一个登录页面,我想问你们,最好的方法是什么。我应该去还是应该尝试Forms Authentication in Asp.Net看看.哪个更合适。如果可能的话,请让我知道这些方法的一些优缺点。也有人可以建议我一些链接作为一个好的起点。任何建议都非常受欢迎。谢谢Ajax LoginAsp.Net

4

2 回答 2

1

我认为您必须进行表单身份验证。以下是它的优点。

1) users do not have to be member of a domain-based network to have access to your application. 
2) Web applications, particularly commercial sites where customers order products, want to have access to user information. Forms authentication makes these types of applications easier to create.
3) Keep personalization cookies that contain user-specific preferences and non-sensitive data separate from authentication cookies.
4)Consider reducing the cookie lifetime to reduce the time window in which an attacker can use a captured cookie to gain access to your application with a spoofed identity.

列出在 Web 应用程序中使用表单身份验证的步骤?

1.Set the authentication mode in Web.config to Forms.
2.Create a Web form to collect logon information.
3.Create a file or database to store user names and passwords.
4.Write code to add new users to the user file or database.
5.Write code to authenticate users against the user file or database.

希望这些信息对您做出决定有所帮助

于 2012-04-06T09:03:24.397 回答
0

使用OAuth登录。

它也有 ASP.net 绑定.. http://oauth.net/code/

于 2012-04-06T08:53:24.830 回答