ASP.NET - Problem Membership Login even when i type correct Username and passwprd.

Asked By rajesh kokul on 29-Nov-12 03:04 AM
I am using membership in ASP.Net project.

 if (ModelState.IsValid)
           {
               if (Membership.ValidateUser(model.username.Trim(), model.password.Trim()))  
//control goes directly to else from here even i type correct username and password.
                 {
                       FormsAuthentication.SetAuthCookie(model.username, true);
                 }
         }

Please help me...Thank in advance
Ajay Paritala replied to rajesh kokul on 30-Nov-12 04:20 PM
May be user get Locked Out

Try with another user or check this user ISlocked Status in database directly.
Ajay Paritala replied to rajesh kokul on 30-Nov-12 04:20 PM
May be user get Locked Out

Try with another user or check this user ISlocked Status in database directly.
rajesh kokul replied to Ajay Paritala on 04-Dec-12 01:00 AM
yes we have checked dis cond also. all users are IslockedOut="false" in database.....

will u plz suggest any other solution... Its very urgent plz... we r stuck in dis prob since last week.....

Thanks in advance......
Ajay Paritala replied to rajesh kokul on 04-Dec-12 07:44 AM
Even i use the Membership conept for me its working fine.
Can you please try by creating a new member?
Ajay Paritala replied to rajesh kokul on 04-Dec-12 07:59 AM
Debug the code and look for some clues.

Have a look at this link it explains clearly about Membership Login functionality
:- http://www.aspdotnet-suresh.com/2011/12/how-to-create-simple-login-form-using.html