set PasswordQuestion and Answer...Please Help
Last Post 12/15/2010 7:28 AM by Joseph Craig. 1 Replies.
Author Messages
Ehtesham
Nuke Newbie
Nuke Newbie
Posts:1


--
12/15/2010 7:12 AM  
Hi

  i have a requirement to store Security Question and Answer, Their are columns in aspnet_Membership Table passwordQuestion and PasswordAnswer.i am using the following code

            UserInfo User = new UserInfo();
            User.AffiliateID = Null.NullInteger;
            User.DisplayName =txtDisplayName.Text;
            User.FirstName = txtFirstName.Text;
            User.LastName = TxtLastName.Text;
            User.Membership.Username = txtUserName.Text;
            User.Membership.Password = txtPassword.Text;
            User.Membership.CreatedDate = DateTime.Now;
            User.Membership.Email = txtEmail.Text;
            User.PortalID = this.PortalId;
            User.Username = txtUserName.Text;
            User.Email = txtEmail.Text;
            User.Membership.PasswordQuestion =TxtSecurityQuestion.Text;
            User.Membership.PasswordAnswer = TxtSecurityAnswer.Text;
            UserCreateStatus ucStatus = UserController.CreateUser(ref User);

I am not able to store Password Question and answer in aspnet_Membership Table

Am i wrong some where......

Thanks in advance
Joseph Craig
DNN MVP
Posts:11667


--
12/15/2010 7:28 AM  
You need to set requiresQuestionAndAnswer to true in web.config in the membership section before this functionality is enabled in DotNetNuke. I believe that the information is stored in the UserProfile table, not the aspnet table.

Joe Craig, Patapsco Research Group
Complete DNN Support


---