Object Reference not set to an instance of an object

Topics: Developer Forum
Apr 15, 2007 at 7:57 AM
If RequiresQuestionAndAnswer is false, creating a new user tries to call EncodePassword with a null passwordAnswer thus throwing everybody's favorite "object reference not set to an instance of an object"

Changing line 306 of NHibernateMembershipProvider.cs to this seems to help:
if(RequiresQuestionAndAnswer)
user.PasswordAnswer = EncodePassword(passwordAnswer, machineKey.ValidationKey);
Coordinator
Apr 15, 2007 at 4:22 PM
Thanks! Good catch. I will make the update in the code. Cheers.