Value cannot be null;Parameter name: passwordAnswer

B

Ben

Hi,

i try to get the password of the membershipuser that is just created in
ASPNETDB.MDF (i checked it) with CreateUserWizard.
I tried with "Clear" and with "Encrypted" (with generating a machinekey)
passwordFormat.
The property enablePasswordRetrieval="true".

The CreateUserWizard page redirects to the pw.aspx page which contains in
code-behind this code:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
If User.Identity.IsAuthenticated Then
Dim pw As String
pw = Membership.GetUser.GetPassword.ToString
End If
End Sub


This produces following error for both "Clear" and "Encrypted"
passwordFormat at line:
' pw = Membership.GetUser.GetPassword.ToString'

"Value cannot be null.
Parameter name: passwordAnswer "

Thanks for help
Ben
 
G

Guest

Hi,

i try to get the password of the membershipuser that is just created in
ASPNETDB.MDF (i checked it) with CreateUserWizard.
I tried with "Clear" and with "Encrypted" (with generating a machinekey)
passwordFormat.
The property enablePasswordRetrieval="true".

The CreateUserWizard page redirects to the pw.aspx page which contains in
code-behind this code:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
If User.Identity.IsAuthenticated Then
Dim pw As String
pw = Membership.GetUser.GetPassword.ToString
End If
End Sub

This produces following error for both "Clear" and "Encrypted"
passwordFormat at line:
' pw = Membership.GetUser.GetPassword.ToString'

"Value cannot be null.
Parameter name: passwordAnswer "

Thanks for help
Ben

Ben, if I remember correctly, there is a passwordAnswer - an answer to
a security question.
 
B

Ben

Hi Alexey; thanks for replying

I can see there are two syntaxes:
GetPassword()
and
GetPassword(passwordAnswer as string)

In the web.config, i change the property requiresQuestionAndAnswer="true"
to "false
and now it works.

But doing this way, there is no security question / answer in the
authentification form.
Is there no possibility to inplement a security question/answer?

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top