If the applicationProgramUse ASP. NET Can be used for identity verification. Passwordrecovery Control to enable password restoration in this application. At this time, the application will send the user the current password or new password, depending on the configuration of the membership provisioner. By default, ASP. NET It will use an irreversible encryption scheme to hash the password and then send the new password to the user. If the membership provider is configured, the password can be encrypted or stored in plaintext (not recommended). The current password of the user will be sent.
To restore the password, the application must be able to send an email to the user. Therefore, you must useSMTPThe server name configures the application so that the application can forward emails to the server.
1 Create or edit a website that anonymous users can access ASP. NET Webpage (for example, Recoverpassword. aspx ). You can use Location The configuration element specifies that a page can be accessed anonymously, as shown in the following example:
<Configuration>
<Location Path = "recoverpassword. aspx">
<System. Web>
<Authorization>
<Allow users = "? "/>
</Authorization>
</System. Web>
</Location>
<System. Web>
<Authentication mode = "forms">
<Forms loginurl = "userlogin. aspx"/>
</Authentication>
<Authorization>
<Deny users = "? "/>
</Authorization>
</System. Web>
</Configuration>
2, SetPasswordrecoveryControls are placed on the page, as shown in the following example:
<Asp: passwordrecovery id = "passwordrecovery1" runat = "server">
</ASP: passwordrecovery>
3 Or, configure the following template to customize Passwordrecovery Widget appearance: Usernametemplate , Questiontemplate And Successtemplate .