Have you looked at
http://www.asp.net/Tutorials/quickstart.aspx?
Especially the ASP.NET Web Forms and Security part?
One issue is that you should make sure that you are not storing the
password itself, but instead a hash of the password. This is for
security -- what happens if someone steals your database? They get
everyone's password, which A) may be the same on other systems and B)
they can login without anyone noticing that the password has been
compromised.
Here is a hashing function that uses the username as a salt:
Imports System
Imports System.Security.Cryptography
Public Shared Function HashPassword(username as string, password as
string) As String
Dim combined as string = username.ToUpper() + password 'Username
is case-insensitive
Dim data as Byte() =
System.Text.Encoding.Unicode.GetBytes(combined)
Dim myMD5 as MD5 = MD5.Create()
Dim output as Byte() = myMD5.ComputeHash(data)
myMD5.Dispose()
Return Convert.ToBase64String(output)
End Function
The result is a 24 character string, that you can store in the
database.
-mike
MVP
"Abraham" <al********@yahoo.com> wrote in message
news:06****************************@phx.gbl...
in my sql server database i have a table with the
following fields;
email
username
password
secret_Questin
i have connected this table to ASP.net...
So can anyone give me the code of creating .aspx page
(aspx.vb) that will require a user to enter password and
user name, forgot password and sign up for new user.
i need the "username" to be the email address...
and if the user forgot the password it will ask him to
enter his email and the email will aoutomatically sent to
user's address
in brief i need the log in screen and forgot password as
the same an in the below website
For login:>>
http://www.asp.net/Forums/default.aspx?
tabindex=1&tabid=39
For creating new account>>
http://www.asp.net/Forums/User/Creat...spx?tabindex=1
For forgeting password>>
http://www.asp.net/Forums/User/Email...Password.aspx?
tabindex=1
i am not expert in ASP.Net....so would u plz send me the
code of my request..
my email is al********@yahoo.com