473,406 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

login in aspx

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

Jul 19 '05 #1
4 2184
hi abraham ..
everybody has to start somewhere .. and its good that u started ..
it would be very easy to send u the code .. but could u try it first
...? that way from a beginner u'll learn a lot more ...
i'm not sure if u have any previous web development experience .. but
i'll still tell u how to go about it ..
Login :
Create the form and drag and drop 2 texboxes and a button and a label.
double click on the button and go to the code behind page.
here import the system.data.sqlclient class.
in the button_click event .. create a db connection and run a simple
sql command that will fetch u any records with that userid and
password.use the datareader to execute the command.
if no record exists then give assign an error message to the label.
if u do this .. u can easliy create the create account form.. concept
is the same ..
for validation chk the sdk on how to use validation controls ..
ur forgot password requires u to use the webmail class i think .. u
can find enough help in teh sdk or in msdn ..
try it .. if u still have any difficulties .. let us know and we'll
help u out ..
good day ..
Jul 19 '05 #2
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&amp;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

Jul 19 '05 #3
i would like to thank you alot Michael Giagnocavo
i really appreciate your help.
i will try to do it

Mr.Abraham S
Cyber_Man
al********@yahoo.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #4

thanks alot Soni, i really appreciate your help

Mr.Abraham S
Cyber_Man
al********@yahoo.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: David Krussow | last post by:
Just wondering if/how it would be possible to display a variable string on the login form - where the string varies depending on the form the user attempted to access. To clarify, an...
11
by: David W. Simmonds | last post by:
I have a form that will prompt for a user name/password. In VS.NET, I have the protected form in a folder named Admin. I have a Web.config file in that folder as well. It contains the following...
4
by: 23s | last post by:
I had this problem in the past, after a server reformat it went away, and now after another server reformat it's back again - no clue what's doing it. Here's the flow: Website root is public, no...
0
by: Mach Runner | last post by:
I am implementing a secure website using the ASP.NET FormsAuthentication model. I have taken the simplest code examples from MSDN (login.aspx,default.aspx, web.config) but cannot get proper...
2
by: pv | last post by:
Hi everyone, I need help with following scenario, please: Users are accessing same web server from intranet (users previously authenticated in Active Dir) and from extranet (common public...
1
by: frekster | last post by:
All, Windows xp pro box with vs 2003 and .net 1.1 installed. Downloaded a project from source safe via vpn to my ome pc to work from home. I have three other projects on my pc that works fine...
1
by: Jakob Lithner | last post by:
When I started a new ASP project I was eager to use the login facilities offered in Framework 2.0/VS 2005. I wanted: - A custom principal that could hold my integer UserID from the database -...
0
by: muder | last post by:
I have a standard Login ASP.NET 2.0 control on a login Page, a LoginName and LoginStatus controls on the member's page. once the user login successfully I am redirecting the user to Member.aspx...
4
by: Ben | last post by:
Hi, I defined roles in order to deny access for some pages to anonymous users. I tested it by typing the url of a denied page to test the system (http://denypage.aspx). It works (access...
2
by: Morgan Cheng | last post by:
In VS2005, I create a ASP.NET website project.One page named Default.aspx with LoginView and LoginStatus controls; and one page named Login.aspx with Login control in it. After setup of users, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.