Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > ResetPassword() to Alpha-numeric?

Reply
Thread Tools

ResetPassword() to Alpha-numeric?

 
 
WB
Guest
Posts: n/a
 
      07-25-2007
Hi,

Is there any way to specify ResetPassword() of the MembershipUser class to
generate passwords of only alpha-numeric characters?


Thanks,
wb
 
Reply With Quote
 
 
 
 
Manish Bafna
Guest
Posts: n/a
 
      07-25-2007
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/lib...epassword.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

 
Reply With Quote
 
 
 
 
WB
Guest
Posts: n/a
 
      07-25-2007
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/lib...epassword.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

 
Reply With Quote
 
Christopher Johnson
Guest
Posts: n/a
 
      02-22-2010
I've read that the only way to accomplish this is to override the GeneratePassword method/write your own implementation. I hope that this helps.

Thanks...Chris



W wrote:

Hi Manish,That doesn't work because the second parameter is for "minimum
25-Jul-07

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
w


"Manish Bafna" wrote:

Previous Posts In This Thread:

On Wednesday, July 25, 2007 2:32 AM
W wrote:

ResetPassword() to Alpha-numeric?
Hi

Is there any way to specify ResetPassword() of the MembershipUser class t
generate passwords of only alpha-numeric characters

Thanks
wb

On Wednesday, July 25, 2007 6:48 AM
ManishBafn wrote:

Hi,The GeneratePassword method is used to generate a random password and is
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/lib...tepassword.asp
--
Hope this answers your question
Thanks and Regards
Manish Bafna
MCP and MCTS


"WB" wrote:

On Wednesday, July 25, 2007 11:36 AM
W wrote:

Hi Manish,That doesn't work because the second parameter is for "minimum
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
w


"Manish Bafna" wrote:


Submitted via EggHeadCafe - Software Developer Portal of Choice
Putting Twitter Realtime Search to Work
http://www.eggheadcafe.com/tutorials...-realtime.aspx
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments