problem with web.config authentication
i have a form mode authentication like this..
<authentication mode="Forms" >
<forms name="AuthName" loginUrl="/Login.aspx/" timeout="2" protection="All" path="/">
<credentials
passwordFormat="MD5">
<user name="admin" password="admin"/>
</credentials>
</forms>
<passport redirectUrl="Login.aspx"/>
</authentication>
From my login page if i try to access this credentials or validate this credentials its always returning false,
Iam checking this credentials like this
private void btnLogin_Click(object sender, System.EventArgs e)
{
if(FormsAuthentication.Authenticate(txtUserName.Te xt,txtUserPwd.Text))
{
FormsAuthentication.RedirectFromLoginPage(txtUserN ame.Text,chkRememberMe.Checked);
}
else
{
btnLogin.Text="Sorry Try again !";
}
even though iam giving "admin" and "admin" as username and password in login page its always going to else part rather than gng to redirect page.
plz help me in this regard
thanks in advance
vishnu
|