473,394 Members | 1,781 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,394 software developers and data experts.

User Sessions

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
Jul 21 '05 #1
2 1247
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

"hecsan07" <he******@hotmail.com> wrote in message
news:78**********************************@microsof t.com...
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

Jul 21 '05 #2
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

"John Timney (ASP.NET MVP)" wrote:
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

"hecsan07" <he******@hotmail.com> wrote in message
news:78**********************************@microsof t.com...
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


Jul 21 '05 #3

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

Similar topics

7
by: fr? | last post by:
Hi, i have a website , on wich users have to log in credentials are checked against mysql db some session vars are set during login for use somewhere else in the code. Is there a way to...
15
by: Joshua Beall | last post by:
Hi All, What is the best way to use a cookie to remember a logged in user? Would you store the username and password in two separate cookies? Should the password be plain text? Hashed? Not...
2
by: marslee | last post by:
I want to prevent non-registered users to view a page in my website, For example, when a non-registered user clicks the history page, the website site refuses to go there since he is not...
2
by: d.schulz81 | last post by:
Hi all, We have about 10 different domains that are linked very closely and we want to identify and track every single user that surfs our websites. Later we want to analyse user paths and find...
4
by: Matt Anderson | last post by:
When I use Xcopy to deploy my changes to IIS, it seems to drop the user connections; i.e., empties out their Session variables, etc. I thought ASP.NET was supposed to use shadow deployment and...
3
by: Dave Smithz | last post by:
Hi there, I have a website where users can log into. This users sessions as I believe most people use when implementing a login section of a website (each php page first checks a valid parameter...
13
by: Mickey | last post by:
Hi all, Currently I use a timestamp to log users out after 15 minutes of inactivity. However I also need to log a user out if they have just left the page. I need to do this because I store...
2
by: mktselvan | last post by:
Hi, Existing running oracle application 11i (11.5.8) Database version is 8.1.7.4 There is any command / way to know the number of concurrent users for this application. ...
5
by: Andy | last post by:
I have an admin section of my asp.net 2 application, and I want to be able to automatically login as a different user (Forms Authentication) whilst keeping my current session going too. The problem...
3
by: at_the_gonq | last post by:
Hello, I am hoping to get some guidance on the following scenerio: I have a password protected site where users have various permissions. Are sessions the best way of storing the user's id? ...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.