User Sessions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am novice programmer. The website of the company I work allows users to
sign in in an individual basis. This means that the same user can only be
logged to the site more than once simultaneously. The site checks for the
username of new sessions. If it's the same, the code terminates the previous
session.
We have to log all activities in the site. If a user attempts to login more
than once, we have to log the IP address of the previous session, the browser
type of the previous session, and the same info for the new session to a
database. That is where I come in. I am not sure how to save the information
(i.e. IP Address, browser type, etc) from session to session. How do I go
about this? I tried writing a session variable at the Session_Start method,
but it gets overwritten every time a new session starts. I need help on this
as soon as possible.

Thanks,
Hecdtor
 
store it in the application object at session on start, and remove it again
at session on end. If you find it already exists then its a duplicate user.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director
 
The username of the visitor is not yet available at Session OnStart. I need
to check the username to make sure the request comes from the same user.

Hector
 
Back
Top