While creating the login page I did set it to use customproviders. We had comment out the lines and call the membership.validateUser to make it work.
Please advise what I shd do so I can use the FormAuthentication class. Here is the .cs code for the login page
public
partial class LoginRadWindow : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack && Membership.ValidateUser(UsernameTextbox.Text, PasswordTextbox.Text))
{
//if (User.Identity.IsAuthenticated)
RadScriptManager.RegisterStartupScript(this, this.GetType(), "closeDialog", "closeDialog();", true);
}
}
protected void Login_OnClick(object sender, EventArgs e)
{
//if (FormsAuthentication.Authenticate(UsernameTextbox.Text, PasswordTextbox.Text))
if (Membership.ValidateUser(UsernameTextbox.Text, PasswordTextbox.Text))
{
Session[
"User"] = UsernameTextbox.Text;
RadScriptManager.RegisterStartupScript(this, this.GetType(), "closeDialog", "closeDialog();", true);
RadScriptManager.RegisterStartupScript(this, this.GetType(), "redirect", "window.top.location.href ='" + FormsAuthentication.GetRedirectUrl(UsernameTextbox.Text, false) + "';", true);
//FormsAuthentication.RedirectFromLoginPage(UsernameTextbox.Text, false);
}
else
Msg.Text =
"Login failed. Please check your user name and password and try again.";
}
}