loginpage

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • guedela
    New Member
    • May 2007
    • 1

    #1

    loginpage

    i am developing a webpage asp.net-c# code, loginpage in that forgotpassword i had placed , and i had given a hint question to recover a password , that password is showing directly on webpage and it is not security to my client , i need that recover password should send to user email id , i dont how to do this , in which way i would do this
  • prabunewindia
    New Member
    • Mar 2007
    • 199

    #2
    hi friend,
    i think u r udisplaying the password, if the hint question answer is correct.
    just write the code to send mail instead of displaying password. fix the To mailID
    as the person who is logging in
    thats
    Prabu

    Comment

    • chinu
      New Member
      • Jun 2007
      • 36

      #3
      Originally posted by prabunewindia
      hi friend,
      i think u r udisplaying the password, if the hint question answer is correct.
      just write the code to send mail instead of displaying password. fix the To mailID
      as the person who is logging in
      thats
      Prabu
      Look at the "SmtpMail" class. May be you can go through this
      "http://www.aspheute.co m/english/20000918.asp"

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        Originally posted by guedela
        i am developing a webpage asp.net-c# code, loginpage in that forgotpassword i had placed , and i had given a hint question to recover a password , that password is showing directly on webpage and it is not security to my client , i need that recover password should send to user email id , i dont how to do this , in which way i would do this
        You're on the right track.

        Ask them for their response to the hint question and if they give the correct answer I would create a new password (random password) and email them that one.

        I suggest this because you are never supposed to store user passwords. Its too much of a security risk....people tend to use the same password for everything they do because its easy to remember (even though they aren't supposed to). So leaking this information can be devastating to your users.

        Instead you should store a password hash...since the password hash is one way, you can not get the password based on a hash. This secures the users' passwords in case your system gets hacked.

        Since you never actually know the password you will have to create a new password for the user and send them that one...then let them change their password once they're logged in.

        You should be using System.Web.Secu rity and System.Security .Cryptography to create the password hash which you store in your database...(eg if you use Forms Authentication there's a HashPasswordFor StoringInConfig File function which will create the password for you based on which Cryptography algorithm you want to use...eg "SHA1").

        Does this make sense?

        -Frinny

        Comment

        Working...