Export (0) Print
Expand All

SimpleMembershipProvider::GeneratePasswordResetToken Method (String, Int32)

Generates a password reset token that can be sent to a user in email.

Namespace:  WebMatrix.WebData
Assembly:  WebMatrix.WebData (in WebMatrix.WebData.dll)

public:
virtual String^ GeneratePasswordResetToken(
	String^ userName, 
	int tokenExpirationInMinutesFromNow
) override

Parameters

userName
Type: System::String
The user name.
tokenExpirationInMinutesFromNow
Type: System::Int32
(Optional) The time, in minutes, until the password reset token expires. The default is 1440 (24 hours).

Return Value

Type: System::String
A token to send to the user.

ExceptionCondition
ArgumentException

username is empty.

ProviderException

The database operation failed.

InvalidOperationException

The SimpleMembershipProvider class was not initialized using a call to the InitializeDatabaseConnection() method.

  • Medium trust for the immediate caller. This member can be used by partially trusted code.
Show:
© 2014 Microsoft