PDA

View Full Version : club starter kit-auto response email


Aristotle
05-09-2006, 09:53 AM
It's actually sending you a new random password, since the membership provider stores passwords in the database as non-reversible Hashed by default. You can configure the membership provider to store passwords in the database in Clear or Encrypted instead.

The default membership provider looks like this:
[quote]
<membership>
<providers>
<addname='AspNetSqlMembershipProvider'
type='System.Web.Security.SqlMembershipProvider,Sy stem.Web,Version=2.0.0.0,Culture=neutral,PublicKey Token=b03f5f7f11d50a3a'
connectionStringName='LocalSqlServer'
enablePasswordRetrieval='false'
enablePasswordReset='true'
requiresQuestionAndAnswer='true'
applicationName='/'
requiresUniqueEmail='false'
passwordFormat='Hashed'
maxInvalidPasswordAttempts='5'
minRequiredPasswordLength='7'
minRequiredNonalphanumericCharacters='1'
passwordAttemptWindow='10'
passwordStrengthRegularExpression=''/>
</providers>
</membership>
</CODE>

You will need to change the following:
enablePasswordRetrieval='true'
passwordFormat='Clear' - or 'Encrypted' if you configured your own machineKey element, which is for another discussion.
and remove then re-add the provider like below...

[quote]
<membership>
<providers>
<removename='AspNetSqlMembershipProvider'/>
<addname='AspNetSqlMembershipProvider'
type='System.Web.Security.SqlMembershipProvider,Sy stem.Web,Version=2.0.0.0,Culture=neutral,PublicKey Token=b03f5f7f11d50a3a'
connectionStringName='LocalSqlServer'
enablePasswordRetrieval='true'
enablePasswordReset='true'
requiresQuestionAndAnswer='true'
applicationName='/'
requiresUniqueEmail='false'
passwordFormat='Clear'
maxInvalidPasswordAttempts='5'
minRequiredPasswordLength='7'
minRequiredNonalphanumericCharacters='1'
passwordAttemptWindow='10'
passwordStrengthRegularExpression=''/>
</providers>
</membership>
</CODE>

You'll probably have to recreate all your users so that their password format is updated in the database.

Aristotle

DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)

danras
05-09-2006, 11:34 AM
I have set up the 'ClubSite' web site. I have a problem with the autoResponse to send back a forgotten password. On the login.aspx page, you can enter your loginID and then your hint question and your password is to be auto sent back to your registered email account. I have it all working but when it sends back the email it shows the loginID and a jumbled password instead of the 'english' password. Has anyone got this to work or had the same problem?

Dan

danras
05-11-2006, 03:16 AM
/emoticons/hop.gif

Thankyou!! Thankyou!!
I spent a lot of time trying to make this function work. I appreciate your time in helping me. Everything works good.

Dan