Guys, I just can't understand this. Users are validated and logged in but they are not authenticated. Membership.ValidateUser() passes but when I check User.Identity.IsAuthenticated, it always returns false. What am I missing. The problem is just very strange to me. Please I need help ASAP.
Below is the code
protected void LoginButton_Click(object sender, EventArgs e)
{
if (Membership.ValidateUser(txtEmail.Text, txtPassword.Text))
{
FormsAuthentication.RedirectFromLoginPage(txtEmail.Text, false);if (HttpContext.Current.User.Identity.IsAuthenticated) { string name = Membership.GetUser().UserName; }
}
else
{
lblInfo.Text = "Invalid email or password!";
}
}The lines in bold never execute even after user has been logged in by the line immediatel above.