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

Monitoring concurrent users in ASP.NET v1.1 app

I have an ASP.NET application which my company sells comercially. We license
on a concurrent user model, but we currently rely on the "honor" system for
the customers to give us their best guess as to the maximum number of
concurrent users they will need. We do this because, so far, we have not
been able to come up with any mechanism for reliably monitoring how many
users have active sessions and locking out users until a license becomes
"free".

We've tried using the Session_Start and Session_End events, but these events
don't fire reliably and we end up not accuratley counting the active
sessions. We even had a Microsoft engineer trying for several days to help
us with this problem but he could not come up with a solution either.

Has anyone succesfully implemented a concurrent license model on an ASP.NET
application? The system has to "free" a license when the user just closes
IE, or when the session tmes out. If anyone has done this I would appreciate
being pointed in the right direction.
--
Thanks,

Bill Manring

Dec 31 '05 #1
6 3323
Bill Manring wrote:
I have an ASP.NET application which my company sells comercially. We
license on a concurrent user model, but we currently rely on the
"honor" system for the customers to give us their best guess as to
the maximum number of concurrent users they will need. We do this
because, so far, we have not been able to come up with any mechanism
for reliably monitoring how many users have active sessions and
locking out users until a license becomes "free".

We've tried using the Session_Start and Session_End events, but these
events don't fire reliably and we end up not accuratley counting the
active sessions. We even had a Microsoft engineer trying for several
days to help us with this problem but he could not come up with a
solution either.


This is not something that can be accomplished reliably. Session_End doesn't
fire deterministically. Therefore, in order to know for sure how many users
there are, you would need to have the users authenticate and maintain that
count yourself.

--
Jim Cheshire
================================
Blog: http://blogs.msdn.com/jamesche

Latest entry:
Getting the PID and TID of a COM Call

Describes how to get the PID of the
dllhost process a COM call is executing
in and how to locate the thread as well.

Dec 31 '05 #2
Thanks to Jim and Stan for the replies. I'll provide some more details.

We do authenticate users, so we can keep track when a user logs in. The
real problem is with keeping track of when the user stops using the
application. There can be several scenarios in which a user coudl "log out".
First, the user could use the log out functionality we provide, which they
rarely do. Second, most commonly, they simply close Internet Explorer. We
have been able to come up with some java script that captures the closing of
IE on the client and instantly aborts the session on the server immediately.
The third scenario would be that the browser sessions just times out.

Like Jim correctly states, the Session_End does not fire reliably, because
thsi would be the way to do this. If I'm not mistaken, the Application_Start
and Application_End events fire when the application starts for the first
time, not every time a user starts a session.

It really appears that keeping track of concurrent users in an ASP.NET
application is something that one can not do. I find this hard to believe.

Anyone else have any good ideas?
--
Thanks,

Bill Manring
"Bill Manring" wrote:
I have an ASP.NET application which my company sells comercially. We license
on a concurrent user model, but we currently rely on the "honor" system for
the customers to give us their best guess as to the maximum number of
concurrent users they will need. We do this because, so far, we have not
been able to come up with any mechanism for reliably monitoring how many
users have active sessions and locking out users until a license becomes
"free".

We've tried using the Session_Start and Session_End events, but these events
don't fire reliably and we end up not accuratley counting the active
sessions. We even had a Microsoft engineer trying for several days to help
us with this problem but he could not come up with a solution either.

Has anyone succesfully implemented a concurrent license model on an ASP.NET
application? The system has to "free" a license when the user just closes
IE, or when the session tmes out. If anyone has done this I would appreciate
being pointed in the right direction.
--
Thanks,

Bill Manring

Jan 1 '06 #3
Bill Manring wrote:
Thanks to Jim and Stan for the replies. I'll provide some more
details.

We do authenticate users, so we can keep track when a user logs in.
The real problem is with keeping track of when the user stops using
the application. There can be several scenarios in which a user
coudl "log out". First, the user could use the log out functionality
we provide, which they rarely do. Second, most commonly, they simply
close Internet Explorer. We have been able to come up with some java
script that captures the closing of IE on the client and instantly
aborts the session on the server immediately. The third scenario
would be that the browser sessions just times out.


Bill,

The first thing you need to realize is that you're not going to be able to
do this as reliably as you'd like to. With that said, you could use a very
small sliding timeout, but you'll have to realize that you're going to have
inaccurate readings. If it were up to me, I'd take a different route. A web
application is just not conducive to this kind of architecture because of
its disconnected nature.

By the way, this is not a limitation of ASP.NET. It's simply the result of
the HTTP architecture.

--
Jim Cheshire
================================
Blog: http://blogs.msdn.com/jamesche

Latest entry:
Getting the PID and TID of a COM Call

Describes how to get the PID of the
dllhost process a COM call is executing
in and how to locate the thread as well.

Jan 1 '06 #4
Jim,

That is the conclusion I have been reluctantly coming to for several months
now. I was just hoping I was missing something.

--
Thanks,

Bill Manring
"Bill Manring" wrote:
Thanks to Jim and Stan for the replies. I'll provide some more details.

We do authenticate users, so we can keep track when a user logs in. The
real problem is with keeping track of when the user stops using the
application. There can be several scenarios in which a user coudl "log out".
First, the user could use the log out functionality we provide, which they
rarely do. Second, most commonly, they simply close Internet Explorer. We
have been able to come up with some java script that captures the closing of
IE on the client and instantly aborts the session on the server immediately.
The third scenario would be that the browser sessions just times out.

Like Jim correctly states, the Session_End does not fire reliably, because
thsi would be the way to do this. If I'm not mistaken, the Application_Start
and Application_End events fire when the application starts for the first
time, not every time a user starts a session.

It really appears that keeping track of concurrent users in an ASP.NET
application is something that one can not do. I find this hard to believe.

Anyone else have any good ideas?
--
Thanks,

Bill Manring
"Bill Manring" wrote:
I have an ASP.NET application which my company sells comercially. We license
on a concurrent user model, but we currently rely on the "honor" system for
the customers to give us their best guess as to the maximum number of
concurrent users they will need. We do this because, so far, we have not
been able to come up with any mechanism for reliably monitoring how many
users have active sessions and locking out users until a license becomes
"free".

We've tried using the Session_Start and Session_End events, but these events
don't fire reliably and we end up not accuratley counting the active
sessions. We even had a Microsoft engineer trying for several days to help
us with this problem but he could not come up with a solution either.

Has anyone succesfully implemented a concurrent license model on an ASP.NET
application? The system has to "free" a license when the user just closes
IE, or when the session tmes out. If anyone has done this I would appreciate
being pointed in the right direction.
--
Thanks,

Bill Manring

Jan 1 '06 #5
Would it be possible to do something with ajax? Something like when
the user closes the window it calls a function that keeps track of the
users currently in the system. A couple articles to help you see what
i mean would be http://www.4guysfromrolla.com/webtech/100604-1.shtml
and http://ajax.schwarz-interactive.de/c...e/default.aspx.

I would think you would be able to do something like that, but then you
have a reliance on javascript being enabled as well.

HTH,
Darren Kopp
http://blog.secudocs.com/

Jan 1 '06 #6
Darren,

I will look into the ajax approach. Having javascript enabled is necessary
to run our application anyway, so that is not an issue. This is an Intranet
application, not a public internet site, so we can specify some requirements
for running the appliaction.

--
Thanks,

Bill Manring
"Darren Kopp" wrote:
Would it be possible to do something with ajax? Something like when
the user closes the window it calls a function that keeps track of the
users currently in the system. A couple articles to help you see what
i mean would be http://www.4guysfromrolla.com/webtech/100604-1.shtml
and http://ajax.schwarz-interactive.de/c...e/default.aspx.

I would think you would be able to do something like that, but then you
have a reliance on javascript being enabled as well.

HTH,
Darren Kopp
http://blog.secudocs.com/

Jan 1 '06 #7

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

Similar topics

1
by: bluedolphin | last post by:
There seems to be a consensus that Access has a concurrent user limit of 200 users. I am working on a system that currently stands at approx. 1 gig and has a small number of users. However, there...
1
by: Krysa | last post by:
Access 2K, DAO, split front end and back end; back end on server. Regarding max of 255 concurrent users. Is it really users, or connections? How would a user have more than one connection to same...
3
by: mgPA | last post by:
Short: How can I limit the number of concurrent logins to Access (2000) DB? Long: I seem to be having the problem discussed in previous postings of having more than 9 or 10 concurrent logins. ...
8
by: pnp | last post by:
Hi all, I've developed a win C# app that is actually database driven using SQL server 2000. The idea is that only one application will be installed on a server in a network and the program will be...
0
by: Jeff Reed | last post by:
I am experiencing the the problem outlined the below. Unfortunately, I am using WinXP and I not sure if I can apply the solution due to lack of security control Any feed back would be apreciated ...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
7
by: =?Utf-8?B?Q2FybG8gRm9saW5p?= | last post by:
Hi, I implemented asynchronous calls to a web resource (using HttpWebRequest) from asp.net 2.0. The request it's made asyncronously (I see that beginGetResponse returns immediately). The number...
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. ...
0
amitpatel66
by: amitpatel66 | last post by:
There is always a requirement that in Oracle Applications, the Concurrent Program need to be execute programatically based on certain conditions/validations: Concurrent programs can be executed...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.