ResetPassword() to Alpha-numeric?

Discussion in 'ASP .Net Security' started by WB, Jul 25, 2007.

  1. WB

    WB Guest

    Hi,

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


    Thanks,
    wb
    WB, Jul 25, 2007
    #1
    1. Advertising

  2. WB

    Manish Bafna Guest

    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
    Manish Bafna, Jul 25, 2007
    #2
    1. Advertising

  3. WB

    WB Guest

    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
    WB, Jul 25, 2007
    #3
  4. 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/library/system.web.security.membership.generatepassword.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/tutorial...24-c9960b55b669/putting-twitter-realtime.aspx
    Christopher Johnson, Feb 22, 2010
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Saunders

    Re: alpha numeric sorting for dataview

    John Saunders, Jul 20, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    2,676
    John Saunders
    Jul 20, 2004
  2. Vernon Peppers

    ResetPassword Requiring passwordAnswer

    Vernon Peppers, Apr 1, 2008, in forum: ASP .Net
    Replies:
    3
    Views:
    1,991
    Steven Cheng [MSFT]
    Apr 2, 2008
  3. Vernon Peppers

    ResetPassword Requiring passwordAnswer

    Vernon Peppers, Apr 1, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    296
    Steven Cheng [MSFT]
    Apr 1, 2008
  4. Bobby Edward
    Replies:
    1
    Views:
    722
    Bobby Edward
    Oct 7, 2008
  5. theWizard1
    Replies:
    0
    Views:
    93
    theWizard1
    Sep 25, 2006
Loading...

Share This Page