Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 remember me!

Author  Topic 

jhermiz

3564 Posts

Posted - 2004-09-13 : 16:45:54
2 easy questions...

Using:

vb.net
asp.net

Trying to just do two basic fundamental things and this web shi* is driving me nuts.

All I want to do is have a function to "remember my password"
on a login page...if it's selected then I guess it stores a cookie or what not so that the user does not have to login every time.

How do I implement this in vb.net. Do I need to use cookies? Is there anyone with some example code to get me going ? Should I be using form authentication? Basically I have this web.config file (the xml file) but I do not watn to list my users in this. Instead I have a users table with user names and passwords. I just want to make a connection to the db, go into that table, check if the user exists or not and allow him / her to enter the site.

Additionally I want to add the functionality to "Remember My Password". I didn't realize moving from regular apps to web based would be so difficult :(

Shanks many,

Jon


Jon
www.web-impulse.com

Can you dig it: http://www.thecenturoncompany.com/jhermiz/blog/

DustinMichaels
Constraint Violating Yak Guru

464 Posts

Posted - 2004-09-13 : 17:12:50
You will need to use a persistant cookie to implement the "remember my password" feature.

Web applications suck at first, but they get easier when you have more experience. After a while they are as easy as windows applications.

Dustin Michaels
Go to Top of Page

jhermiz

3564 Posts

Posted - 2004-09-13 : 20:47:05
Do you have example code of vb.net and asp.net to accomplish this...

please post something along the lines of authenticating the user via a table (not the web config file) as well as how to implement the "remember my password" feature.

Any help is greatly appreciated.

Thanks

Jon
www.web-impulse.com

Can you dig it: http://www.thecenturoncompany.com/jhermiz/blog/
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2004-09-14 : 13:23:49
We drop a cookie with a GUID in it, and use that GUID in the database to remember all their "preferences".

Dunno about VB.NET, olf fashioned ASP would have been something like

Response.cookies("USERID") = strMyGUID
Response.Cookies("USERID").Expires = DateAdd("yyyy", 10, Date())
Response.Cookies("USERID").Path = "/"

For a login form you could read the cookie in JavaScript (i.e. client-side) and pre-fill the form based on stored UserID & password - thus the cookie does not need a roundtrip to the server to fill in the form ...

Kristen
Go to Top of Page
   

- Advertisement -