Working with the Forgot Password Web Part

The Forgot Password Web Part lets shoppers receive a temporary password. These temporary passwords expire after a short period, such as two hours, for security reasons. After the shoppers log in with the temporary passwords, they are prompted to change their password to something of their own choosing.

The Forgot Password Web Part uses the standard ASP.NET PasswordRecovery server control.

You can use the Forgot Password Web Part in the Microsoft Windows SharePoint Services and Microsoft Office SharePoint Server deployment environments. The components are as follows:

  • ForgotPasswordWebPart. Class derived from BaseUserControlWebPart that dynamically loads the Forgot Password user control.

  • ForgotPassword.ascx. Displays an ASP.NET PasswordRecovery control to the shopper. The control uses the membership provider to alter the shopper in the Commerce Server 2009 R2 Core Profiles System. You can provide e-mail support by configuring Simple Mail Transfer Protocol (SMTP) settings.

To enable e-mail notification used in the Forgot Password Web Part, you must configure the SMTP in the Web.Config file for your application. 

The system.net section in the Web.config file should be similar to the following:

<system.net>
      <mailSettings>
            <smtp deliveryMethod="Network" from="store@yourcompany.com">
            <!-- 
            Uncomment the next line to configure a smart host server
            <network host="yourcompany_SMTP" />
            -->
            </smtp>
      </mailSettings>
</system.net>

Note

You must change the e-mail address and SMTP server name to the appropriate values for your site and network.

Properties

The following table lists the mapping of the properties for the Forgot Password Web Part.

Property

Maps to

Type

Description

Default

Email "subject" text

EmailSubjectLine

String

Sets the text displayed as the "subject" part of the email. The string will be passed to the Subject property of the System.Web.UI.WebControls.MailDefiniton class, which will be used by the "PasswordRecovery" .Net control. Please consult the .Net reference for further details.

Reset password at anything@adventure-works.com

Email template file

EmailTemplateFile

String

Sets the file path to the body content of the email. The path will be passed to the BodyFileName property of the System.Web.UI.WebControls.MailDefiniton class, which will be used by the "PasswordRecovery" .Net control. Please consult the .Net reference for further details.

Blank

Instructional text

HelpLabelText

String

Sets the text block displayed above the password change area. Can be used to provide instructions to end users.

Need help with your account? contact us: 1800 999-9999

"Step one" section title text

StepOneLabelText

String

Sets the text displayed above the first step of the password change.

Step 1: Enter e-mail address

"Step two" section title text

StepTwoLabelText

String

Sets the text displayed above the second step of the password change.

Step 2: Answer security question

"change password confirmation" section title text

String

Sets the text displayed above the "change password confirmation" section.

Change Password Confirmation

"User name" section title text

UserNameTitleText

String

Sets the text above the "user name" section.

Forgot your password?

"User name" instructional text

UserNameInstructionText

String

Sets the text displayed above the user name section which can be used to provide instructions to end users.

If you have forgotten your password you can have a new password generated and e-mailed to you.

"User name unknown" message

UserNameFailureText

String

Sets the text displayed when the user submits a user name that is not recognized.

Unable to recognize your e-mail address

"User name" label text

UserNameLabelText

String

Sets the text displayed next to the "user name" text box.

E-mail address

"User name is required" message

UserNameRequiredErrorMessage

String

Sets the text displayed when the user submits the form without supplying a value for "user name".

Please insert e-mail address

"Submit" button text

SubmitButtonText

String

Sets the text displayed on the "submit" button..

E-mail me a new password

Security question section title text

QuestionTitleText

String

Sets the text displayed above the security question section.

Identity Confirmation

"Security question" instructional text

QuestionInstructionText

String

Sets the text displayed in the security question section which can be used to provide instructions to end users.

Answer the following question to receive your new password

"Security question" label text

QuestionLabelText

String

Sets the text displayed beside the security question.

Security question

"Security question's answer" label text

AnswerLabelText

String

Sets the text displayed beside the "security question's answer" text box.

Security answer

"Security question's answer is required" message

AnswerRequiredErrorMessage

String

Sets the text displayed when the user submits an invalid value for the "security question's answer".

Please insert the answer

"Security question invalid answer" text

QuestionFailureText

String

Sets the text displayed when the user submits an invalid answer for the security question.

Incorrect answer

"Success" message

SuccessText

String

Sets the text displayed once the operation has completed successfully.

A new password has been created and e-mailed to you.

"Retrieve security question" button text

RetrieveSecurityQuestionButtonText

String

Sets the text displayed on the "retrieve security question" button.

Retrieve my security question.

"Home" button text

HomeButtonText

String

Sets the text displayed on the "home" button.

Return to Login Page

"General failure" text

GeneralFailureText

String

Sets the text displayed when an unspecified error has occurred.

Failed to recover your password, please try again.

See Also

Other Resources

Developing with SharePoint Commerce Services

Developing with Profiles System Web Parts

Forgot Password Web Part