what to do if membership.validateuser(username, pwd) allways return false

To start with,,.. this has been quiet a head eik for me,.. after i have written the code for a Webform with some user validation on it ,.. and to my amazement everything worked fine except the validation ,.. the username and password matched  up with the datatabse ,.. but membership.validateuser() refuzed stubbernly to validate correctly.. and nothing what i did could make it do otherwise ,.. It was quite a while before I realized what the problem was ,.. 

It appears that  Membership.ValidateUser will always return false if one of thise conditions is true:

  1. Member is locked out (IsLockedOut ==true).
  2. Member is not approved (IsApproved == false).
  3. And of curse if Member username and/or password are incorrect.

Problem solved ,..

Advertisements

2 Responses to what to do if membership.validateuser(username, pwd) allways return false

  1. Thank you so much you saved my lot of time

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: