473,549 Members | 2,741 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Track a session user

If I am using FormsAuthentica tion, is there a way to check who is logged in?

I want to be able to check at any particular time, not just how many people
are logged in, but who they are.

One thing I want to do is not allow someone to log on from one browser and
then log on again at the same time time from another browser. Or to prevent
someone from using the same login at the same time.

Thanks,

Tom
Nov 19 '05 #1
5 3699
Hi Tom,

I'm actually working on the same problem at this time and found some good
articles:

http://www.eggheadcafe.com/articles/20030416.asp
http://www.eggheadcafe.com/articles/20030418.asp
http://www.aspfree.com/index.php?opt...k=view&id=2118

All articles use a similar technique whereby you store the current user's id
in application cache when they log in and remove it when they log out and it
works fairly well.

The only problem I have now is that my customer wants a user to be logged
out of the system when he uses the same browser to navigate to a different
website (without logging out). I other words, if the user navigates to a
different website and uses the back button to get back to my application, he
should have to log in again.

Sacha
"tshad" <ts**********@f tsolutions.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
If I am using FormsAuthentica tion, is there a way to check who is logged
in?

I want to be able to check at any particular time, not just how many
people are logged in, but who they are.

One thing I want to do is not allow someone to log on from one browser and
then log on again at the same time time from another browser. Or to
prevent someone from using the same login at the same time.

Thanks,

Tom

Nov 19 '05 #2
"Sacha Korell" <ko****@huntsvi lle.sparta.com> wrote in message
news:eb******** ******@TK2MSFTN GP14.phx.gbl...
Hi Tom,

I'm actually working on the same problem at this time and found some good
articles:

http://www.eggheadcafe.com/articles/20030416.asp
http://www.eggheadcafe.com/articles/20030418.asp
http://www.aspfree.com/index.php?opt...k=view&id=2118

All articles use a similar technique whereby you store the current user's
id in application cache when they log in and remove it when they log out
and it works fairly well.
I'll read those.

I also need to take into account when the session times out. I was looking
at putting a variable in the Application (global.asax) and track that each
time a person logs in. But I ran into problems about when do you take it
out? What if the user never logs out? What about the time out I mentioned?
I would need to know when to remove him. That's why I was looking at the
FormsAuthentica tion, since that is being kept track of anyway.

The only problem I have now is that my customer wants a user to be logged
out of the system when he uses the same browser to navigate to a different
website (without logging out). I other words, if the user navigates to a
different website and uses the back button to get back to my application,
he should have to log in again.
That would be a problem for use also.

Thanks,

Tom
Sacha
"tshad" <ts**********@f tsolutions.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
If I am using FormsAuthentica tion, is there a way to check who is logged
in?

I want to be able to check at any particular time, not just how many
people are logged in, but who they are.

One thing I want to do is not allow someone to log on from one browser
and then log on again at the same time time from another browser. Or to
prevent someone from using the same login at the same time.

Thanks,

Tom


Nov 19 '05 #3
FormsAuthentica tion and Session are not related. you can run one without the
other and they perform different functions.

FormsAuthentica tion stores a security token in a cookie, and sets it for a
onetime browser session (the browser decides when to expire it).

Session Managers store session data somewhere and store a key in a cookie.
every page hit the cookie expire is updated. if you use the inproc session
manager, it times out the session and releases the session data. in some
cases the session manager may expire the data before the browser expires the
cookie.

as web sites are stateless, it hard to detect who is logged in or not. some
problems you will run into trying to track logins:

1) user navigates from site or closes browser - the server does not know
this, you have to write client code to try to detect and inform the server.

2) if the user creates a new browser window thru the file new window - it
gets the same cookie, so the server does not know two browser are talking to
it.

3) due to nat firewall translation, the ipaddress of the client may change
between page requests.

4) an asp.net recycle clears data stored in Application and inproc sessions
-- bruce (sqlwork.com)


"tshad" <ts**********@f tsolutions.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
| If I am using FormsAuthentica tion, is there a way to check who is logged
in?
|
| I want to be able to check at any particular time, not just how many
people
| are logged in, but who they are.
|
| One thing I want to do is not allow someone to log on from one browser and
| then log on again at the same time time from another browser. Or to
prevent
| someone from using the same login at the same time.
|
| Thanks,
|
| Tom
|
|
Nov 19 '05 #4
There's a time out variable in the samples that you can set. I set mine to
the same as the session time out (20 min) so that they tome out at
approximately the same time when the user doesn't do anything.

Sacha

"tshad" <ts**********@f tsolutions.com> wrote in message
news:e1******** ******@TK2MSFTN GP15.phx.gbl...
"Sacha Korell" <ko****@huntsvi lle.sparta.com> wrote in message
news:eb******** ******@TK2MSFTN GP14.phx.gbl...
Hi Tom,

I'm actually working on the same problem at this time and found some good
articles:

http://www.eggheadcafe.com/articles/20030416.asp
http://www.eggheadcafe.com/articles/20030418.asp
http://www.aspfree.com/index.php?opt...k=view&id=2118

All articles use a similar technique whereby you store the current user's
id in application cache when they log in and remove it when they log out
and it works fairly well.


I'll read those.

I also need to take into account when the session times out. I was
looking at putting a variable in the Application (global.asax) and track
that each time a person logs in. But I ran into problems about when do
you take it out? What if the user never logs out? What about the time out
I mentioned? I would need to know when to remove him. That's why I was
looking at the FormsAuthentica tion, since that is being kept track of
anyway.

The only problem I have now is that my customer wants a user to be logged
out of the system when he uses the same browser to navigate to a
different website (without logging out). I other words, if the user
navigates to a different website and uses the back button to get back to
my application, he should have to log in again.


That would be a problem for use also.

Thanks,

Tom

Sacha
"tshad" <ts**********@f tsolutions.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
If I am using FormsAuthentica tion, is there a way to check who is logged
in?

I want to be able to check at any particular time, not just how many
people are logged in, but who they are.

One thing I want to do is not allow someone to log on from one browser
and then log on again at the same time time from another browser. Or to
prevent someone from using the same login at the same time.

Thanks,

Tom



Nov 19 '05 #5
"bruce barker" <no***********@ safeco.com> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
FormsAuthentica tion and Session are not related. you can run one without
the
other and they perform different functions.

FormsAuthentica tion stores a security token in a cookie, and sets it for a
onetime browser session (the browser decides when to expire it).
But is there a way to query those who were authenticated. I assume the
expiration is set by the timeout value in the web.config file.


Session Managers store session data somewhere and store a key in a cookie.
every page hit the cookie expire is updated. if you use the inproc session
manager, it times out the session and releases the session data. in some
cases the session manager may expire the data before the browser expires
the
cookie.
Does this include postbacks?

as web sites are stateless, it hard to detect who is logged in or not.
some
problems you will run into trying to track logins:

1) user navigates from site or closes browser - the server does not know
this, you have to write client code to try to detect and inform the
server.

2) if the user creates a new browser window thru the file new window - it
gets the same cookie, so the server does not know two browser are talking
to
it.
This is one of the problems I found with Mozilla (Netscape also, I assume).

If I log on using FormsAuthentica tion, and open a new window (before I close
the first one), I am now in both browsers. Very dangerous if you are trying
to track and control data access.

IE, doesn't do this. A new Browser has to log on again, even if there is
already one open.
3) due to nat firewall translation, the ipaddress of the client may change
between page requests.

4) an asp.net recycle clears data stored in Application and inproc
sessions
I need to find out some way to track who is still around as we have a system
that is set up on the concept of seats. Very difficult to handle if you
don't know who is there (or is potentially there - as you say they could
have closed their browser or left the site). If we allow 10 people access
to certain areas of our site at one time, we need to know who is there.

I know you can't know if someone leaves the site or just leaves turns their
browser off. But if you have a timeout of 20 minutes, there should be some
way of know who has been logged on in the last 20 minutes. I was hoping
there was a way to see if a person was their by their sessions and if their
sessions had expired, they are not there anymore.

Tom

-- bruce (sqlwork.com)


"tshad" <ts**********@f tsolutions.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
| If I am using FormsAuthentica tion, is there a way to check who is logged
in?
|
| I want to be able to check at any particular time, not just how many
people
| are logged in, but who they are.
|
| One thing I want to do is not allow someone to log on from one browser
and
| then log on again at the same time time from another browser. Or to
prevent
| someone from using the same login at the same time.
|
| Thanks,
|
| Tom
|
|

Nov 19 '05 #6

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

Similar topics

2
2607
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 registered. what is the best way to do it? And how to identify a user has already logged in when he click the history page?
1
4445
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 keep track of every single user that surfs our websites by the use of sessions. The problem is how to keep track of the session ID across domains. - cookies don't work because not acepted by 40 % of or users and cookies don't work across...
5
2075
by: | last post by:
(subject included - apologies) <jason@catamaranco.com> wrote in message news:... > Is there a simple way to track users leaving our site to vendors whose wares > we have advertised as a banner on our site.....? > > Some of the vendors we deal with may not have sophisticated tracking devices > to allow us to determine if we are...
2
1536
by: Colin Steadman | last post by:
Suppose you have a site structure that looks like this: |--Countries.asp | | |--Region.asp | | |--Cities.asp | | |--Population.asp
3
2231
by: RR | last post by:
We have cards that are numbered consecutively. These cards are given out to different people in different sized batches. One group might get 5, the next group might get 20. What is a good way to set up to keep track of which numbered cards are given out, and to who?
3
2892
by: Alan Wang | last post by:
Hi there, Once my application gets complicated and complicated. I found it's really hard to keep track of Session value I am using in my asp.net application. I am just wondering if anyone have any experience on how to keep track of session value. Any help it's appreciated. Thanks Alan
7
2330
by: andrea | last post by:
Which is the best way to track the number of the user currently logged into a web site? I've some idea on mind, but I want to compare with you. One could be to increment a session variable on the session_start in the global.asa. But what for decrement the value? This is a black ole, that independently of all, I don't know how to solve.
3
4402
by: johnny | last post by:
hi all! I am starting to study the best way to track site visitors. Logfiles stats which come with every web hosting, have little metrics to be analyzed and also problems with cached pages which are not seen. I thought to use php and cookies to track returning visitors, however I see that all pro solutions use javascript to set cookies....
10
9378
by: Mitul | last post by:
Hello everybody, I am developing a community site and almost all works are competed. There is major issue that I am facing is how to track user's online status. I am using session data to save user's login status. There are 2 major issues which I need to handle for tracking user's Online status. 1. When login user close his/her browser....
0
7520
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7450
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7957
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7470
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7809
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5088
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3500
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
763
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.