Forum Moderators: open

Message Too Old, No Replies

Storing LOG details

         

dupati1

2:10 pm on Oct 30, 2003 (gmt 0)

10+ Year Member



Hi All,

I am supposed to log the following details of the user.

1. User Name

2. Time when logged into the page.

3. Time when logged out

and

4. Date

How can i do this? I have on the first page a form which takes in the user name and password information and after validating takes the user to the second page in which i have a form with many fields. The user can select any combinations of the fields and search for a particular medical record. Since this information is very confidential, i wanted to log the user login and logout details. All the pages are written in ASP.

Any examples.

Any Suggestions.

Thanks

VJ

wardbekker

2:22 pm on Oct 30, 2003 (gmt 0)

10+ Year Member



You can append it to a text file, or maybe better, to a database. Search for the filesystem object or the adodb objects in the docs.

Text file is easiest. Just open a text file for reading and append the loging information with a writln statement. The examples in the vbscript docs should give you a good start.

Good luck!

Ps. when transmitting such sensative data over a internet connection, you might want to use a secure http connection (encrypted).

plumsauce

5:15 am on Oct 31, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




unless every user actually does a logout
transaction, there is no logout time.

wardbekker

8:04 am on Oct 31, 2003 (gmt 0)

10+ Year Member



plumsauce,

Well, luckely, there is: the session end method in global.asa can be used for this purpose

plumsauce

11:18 pm on Oct 31, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



small quibble:

the session.onend event is indicative that the user
has bailed, or the session timeout has expired. and
i'm not even sure about the bailing part, because you
can bail without iis knowing about it until the timeout.

so, the fact that the session has timeout certainly
means that the user has not been active, but it is not
an explicit logout.

this subject has arisen before and the point was
made that the fact the user has newly logged in
implies that the time of his last 'logout' was the
time of his last previous action on the system.

there are some corporate types who really do care
about such distinctions.