Hello!
I'm developing an ASP.NET app (c#) that need to authenticate users. To do that I have a SQL Server database with the users of this application.
Which is the best way to do that?
I've been reading this:
http://msdn.microsoft.com/en-us/library/xdt4thhy.aspx
In the example I will to replace this code:
<script runat="server">
void Logon_Click(object sender, EventArgs e)
{
if ((UserEmail.Text == "[email protected]") &&
(UserPass.Text == "37Yj*99Ps"))
{
FormsAuthentication.RedirectFromLoginPage
(UserEmail.Text, Persist.Checked);
}
else
{
Msg.Text = "Invalid credentials. Please try again.";
}
}
</script>
With my ADO.NET Entity code to search the user on the database. It will work?
Another way is Membership (http://msdn.microsoft.com/en-us/library/tw292whz.aspx) but I think it is the hardest way.
Or maybe I can use Windows Live ID but I don't know how to connect Live ID with my users table.
Thank you!