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. Advertisements

  2. WB

    Manish Bafna Guest

    Manish Bafna, Jul 25, 2007
    #2
    1. Advertisements

  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
     
    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


    :

    Previous Posts In This Thread:

    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

    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


    :

    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


    :


    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. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.