V
Vernon Peppers
I have a site that is using membership as provided with ASP.NET. I have a
page to reset the password, that is only available to the site administrator.
I have RequireQuestionandAnswer set to false.
web.config entries
<connectionStrings>
<add name="UserInfoConnectionString" connectionString="Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated
Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
<add name="ASPNETDBConnectionString" connectionString="Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated
Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
<membership userIsOnlineTimeWindow="20">
<providers>
<add connectionStringName="UserInfoConnectionString"
enablePasswordRetrieval="false" enablePasswordReset="true"
requiresUniqueEmail="false" requiresQuestionAndAnswer="false"
maxInvalidPasswordAttempts="5" passwordFormat="Hashed" applicationName="/"
name="SQLProvider" type="System.Web.Security.SqlMembershipProvider"/>
</providers>
</membership>
VB Code
labelReset.Text = "Password for " & ddUsers.Text & vbCrLf & "has been
changed to " & User.ResetPassword()
Whenever I run the site, and try to reset a password, I get an error that
the passwordAnswer can't be null. How do I fix this?
page to reset the password, that is only available to the site administrator.
I have RequireQuestionandAnswer set to false.
web.config entries
<connectionStrings>
<add name="UserInfoConnectionString" connectionString="Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated
Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
<add name="ASPNETDBConnectionString" connectionString="Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated
Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
<membership userIsOnlineTimeWindow="20">
<providers>
<add connectionStringName="UserInfoConnectionString"
enablePasswordRetrieval="false" enablePasswordReset="true"
requiresUniqueEmail="false" requiresQuestionAndAnswer="false"
maxInvalidPasswordAttempts="5" passwordFormat="Hashed" applicationName="/"
name="SQLProvider" type="System.Web.Security.SqlMembershipProvider"/>
</providers>
</membership>
VB Code
labelReset.Text = "Password for " & ddUsers.Text & vbCrLf & "has been
changed to " & User.ResetPassword()
Whenever I run the site, and try to reset a password, I get an error that
the passwordAnswer can't be null. How do I fix this?