password recovery control not working

ganesh71

Member
Joined
Mar 27, 2009
Messages
19
Programming Experience
Beginner
Hi…
I am using ASP.Net 2.0 (VB). I used a login control using ms access database. I also used a password recovery control. I don’t want to send password to the user’s mail Id .Instead I prefer it to display the new password on the screen. I am using the code below.

Protected Sub PasswordRecovery1_SendingMail(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MailMessageEventArgs) Handles PasswordRecovery1.SendingMail

e.Cancel = True
PasswordRecovery1.SuccessText = e.Message.Body

End Sub

The code behind the web.cofig file is…

<connectionStrings>
<add name="LocalAccessDatabase" connectionString="~/App_Data/ASPNetDB.mdb" providerName="System.Data.OleDb"/>
</connectionStrings>
<system.web>
<membership defaultProvider="AccessMembershipProvider">
<providers>
<clear/>
<add name="AccessMembershipProvider"
type="Samples.AccessProviders.AccessMembershipProvider"
connectionStringName="LocalAccessDatabase"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresUniqueEmail="true"
requiresQuestionAndAnswer="true"
minRequiredPasswordLength="1"
minRequiredNonalphanumericCharacters="0"
applicationName="SampleSite"
hashAlgorithmType="SHA1"
passwordFormat="Hashed"/>



</providers>

</membership>

<roleManager enabled="true" cacheRolesInCookie="true" defaultProvider="AccessRoleProvider">
<providers>
<add connectionStringName="LocalAccessDatabase" applicationName="SampleSite"
name="AccessRoleProvider" type="Samples.AccessProviders.AccessRoleProvider" />
</providers>
</roleManager>



<authentication mode="Forms"/>
<compilation debug="true"/>
</system.web>

</configuration>


My problem is that the new password is displayed on my local computer but not on the web server instead it saying “Your password is send to you” while no email is sent by the system. However the password is reset by the control on web server also.
 
Back
Top