|
|
|
start date: Tue, 24 Jul 2007 23:32:04 -0700,
posted on: microsoft.public.dotnet.framework.aspnet.security
back
| Thread Index |
|
1
WB
|
|
2
Manish Bafna
|
|
3
WB
|
ResetPassword() to Alpha-numeric?
Hi,
Is there any way to specify ResetPassword() of the MembershipUser class to
generate passwords of only alpha-numeric characters?
Thanks,
wb
Date:Tue, 24 Jul 2007 23:32:04 -0700
Author:
|
RE: ResetPassword() to Alpha-numeric?
Hi,
The GeneratePassword method is used to generate a random password and is
most commonly used by the ResetPassword method implemented by a membership
provider to reset the password for a user to a new, temporary password.
// Generate a new 12-character password with 0 non-alphanumeric character.
string password = Membership.GeneratePassword(12, 0);
ref:http://msdn2.microsoft.com/en-us/library/system.web.security.membership.generatepassword.aspx
--
Hope this answers your question.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.
"WB" wrote:
> Hi,
>
> Is there any way to specify ResetPassword() of the MembershipUser class to
> generate passwords of only alpha-numeric characters?
>
>
> Thanks,
> wb
Date:Wed, 25 Jul 2007 03:48:00 -0700
Author:
|
RE: ResetPassword() to Alpha-numeric?
Hi Manish,
That doesn't work because the second parameter is for "minimum number of
punctuation characters".
So even if you put 0, it can still generate a password containing multiple
non-alphanumeric characters.
Any other ideas?
Thanks,
wb
"Manish Bafna" wrote:
> Hi,
> The GeneratePassword method is used to generate a random password and is
> most commonly used by the ResetPassword method implemented by a membership
> provider to reset the password for a user to a new, temporary password.
> // Generate a new 12-character password with 0 non-alphanumeric character.
> string password = Membership.GeneratePassword(12, 0);
> ref:http://msdn2.microsoft.com/en-us/library/system.web.security.membership.generatepassword.aspx
> --
> Hope this answers your question.
> Thanks and Regards.
> Manish Bafna.
> MCP and MCTS.
>
>
>
> "WB" wrote:
>
> > Hi,
> >
> > Is there any way to specify ResetPassword() of the MembershipUser class to
> > generate passwords of only alpha-numeric characters?
> >
> >
> > Thanks,
> > wb
Date:Wed, 25 Jul 2007 08:36:03 -0700
Author:
|
|
|