This topic is locked

Tracking user login details and saving it to a log file

7/1/2007 11:51:06
ASPRunnerPro General questions
M
minnydiva author

Hi,
I have looked at the following forum posting regarding logging users access to the database via the login page and have a couple of questions.
http://www.asprunner.com/forums/index.php?...amp;hl=log+file
When you say that adding the relevant code to the login.asp page records the last users time of entry and exit to the database is this literally just printed on the screen or is this information stored in a document such as a log file ie: 'access.log'
If it is just printed on the screen and not stored in a 'logfiles' folder in a log file on the web server is there a way in which this can be done?

Would you be able to program something for me so that all logins via the login.asp page are recorded, I would pay for this service.
What I am aiming to achieve is have various users with their passwords and I wish to record when and at what time they login and how many times they login.
Does this make sense?
Many thanks

Sharron

Sergey Kornilov admin 7/2/2007

I would suggest to create a Log table in your database for this purpose. This table can store logged user name and login date/time.
After that you can implement AfterSuccessfulLogin event:

dbConnection.Execute "insert into Log (username, logindatetime) values ('" & Session("UserID") & "', now())"


This is it.

A
agmoraojr 4/9/2008

hi sergey,
I just followed this syntax by tracking usersname,logindate, and IP address, and voila it is recorded by another .mdb file.
The question, I access the tracking record on access_list_LIST.asp! but when I delete one of the recorded log, all of the content of that tracking_log.mdb was all DELETED. How can that be happen. Any suggestion?
Thanks

I would suggest to create a Log table in your database for this purpose. This table can store logged user name and login date/time.

After that you can implement AfterSuccessfulLogin event:

dbConnection.Execute "insert into Log (username, logindatetime) values ('" & Session("UserID") & "', now())"


This is it.

J
Jane 4/9/2008

Hi,
please make sure that you've selected key field in the database and on the Choose pages tab in the ASPRunnerPro.