Asp.Net登录页面,什么是最好的方法

问题描述:

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

我认为你必须去Forms身份验证。下面是它的优点。

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应用程序中使用Forms身份验证的步骤?

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. 

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

使用OAuth进行登录。

它ASP.net结合太.. http://oauth.net/code/