How to reset and get password of membership user in asp.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • visweswaran2830
    New Member
    • Nov 2009
    • 92

    How to reset and get password of membership user in asp.net

    Hi,

    I am working on membership concepts in asp.net. Now i want to reset new password and getpassword for specific user.

    this is my web.config code:

    <add name="MySqlMemb ershipProvider" connectionStrin gName="SQL2005D B380ConnectionS tring" applicationName ="MyAppName" requiresQuestio nAndAnswer="fal se" requiresUniqueE mail="false" passwordFormat= "Encrypted" enablePasswordR eset="true" minRequiredNona lphanumericChar acters="1" passwordAttempt Window="10" type="System.We b.Security.SqlM embershipProvid er, System.Web, Version=2.0.0.0 , Culture=neutral , PublicKeyToken= b03f5f7f11d50a3 a"/>

    How can I get old password and reset new password.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Have you seen this article on the MembershipUser. GeneratePasswor d Method?

    The MembershipUser' s GeneratePasswor d method allows you to generate a new password for the user. You can specify certain parameters about the password, like how long the password will be after it's generated.

    Once you've generated a new password for the user you can use the MembershipUser. ResetPassword Method to reset the user's password.

    -Frinny

    Comment

    • visweswaran2830
      New Member
      • Nov 2009
      • 92

      #3
      Thank for your response. Actually I am not to this concepts. Could You explain in details. today i gone through one coding. Using that we can control concurrent login, but one problem is let original user has logged in that will be stored in session, when second user tried to logged-in with same username then that details will be replaced that original info, then that session checking is done on global.asax file, if session value is differ, then that user forces to logged out, in this situation that first logged in user will be forced to logged out when another user logged in under name.

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        Huh?

        This would only happen if you had 2 users using the same browser at the same time....what is the likelihood of that happening?

        Even if this did happen...it's probably best that the "first user" (which is the same user) is forced to "log out".

        -Frinny

        Comment

        Working...