473,322 Members | 1,523 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.

Web App: Limiting # of logged in users

Greetings,

I am creating a web application, which I will be selling licenses to
be able to use it. So Customer Group A, could purchase 3 licenses,
Customer Group B could purchase 30.

With the web app I am using asp.net/vb.net

This means Customer Group A, could only have 3 concurrent users logged
in, and for Customer Group B only 30 at one time.

I am using a username, password, groupID criteria to log in to the
system.

My question is - how do I go about being able to say "ERROR: Customer
Group A already has 3 logged in users - please wait to be able to use
the system".

Obviously, I can't use a literal to store the value at during logon -
because if the person does not click a "log out" button and just
closes the browser, it will not increase the number of available seats
for that group.

I have had ideas with using the global.asax file, with possibly using
the Application_Start/End and/or Session_Start/End in some sort of
combination - but curious to see if anyone out there has any bright
ideas.

Your assistance in anyway would be much appreciated.

-Thanks
Jul 21 '05 #1
4 2007
This is not a bright idea by any stretch of the imagination...you could store the information for the 3 concurrent users in a db table. For example, the users are Jimmie, Sam, and Sally. Let's say Sally logs off. You could have some sort of reaper process running which would check for live sessions. If it's not live, remove Sally's info from the db table. You now have an open spot. The good thing about storing the user info in a db table is you can create an admin app which would view exactly who is online, their info, etc

----- Adam wrote: ----

Greetings

I am creating a web application, which I will be selling licenses t
be able to use it. So Customer Group A, could purchase 3 licenses
Customer Group B could purchase 30

With the web app I am using asp.net/vb.ne

This means Customer Group A, could only have 3 concurrent users logge
in, and for Customer Group B only 30 at one time

I am using a username, password, groupID criteria to log in to th
system

My question is - how do I go about being able to say "ERROR: Custome
Group A already has 3 logged in users - please wait to be able to us
the system"

Obviously, I can't use a literal to store the value at during logon
because if the person does not click a "log out" button and jus
closes the browser, it will not increase the number of available seat
for that group

I have had ideas with using the global.asax file, with possibly usin
the Application_Start/End and/or Session_Start/End in some sort o
combination - but curious to see if anyone out there has any brigh
ideas

Your assistance in anyway would be much appreciated

-Thank

Jul 21 '05 #2
From my own hunting around - it seems pretty much nothing short of
JavaScript detecting a browser closing or someone typing a new url in
the address bar, and then redirecting the browser to a .aspx page that
abandons the session will get this to work (which also introduces
browser compatability issues - but I could enforce a certain type of
browser for this product).

I know the session_end will execute upon the session expiring, but I
can't wait 20 minutes for the user slot to clear, nor can I have a 1
minute time out to use the software obviously.

IF there is anything - I mean anything, i.e. creating a server side
dll, some crazy amount of programming - anything - above and beyond
javascript that will let me accomplish this feat - please let me know.
I mean could I have a master window open that has some sort of applet
running talking to the server while the rest of the web app is run?

I am reaching here - but just looking for new ideas and possibilities.

Thanks...
ad*********@yahoo.com (Adam) wrote in message news:<51*************************@posting.google.c om>...
Greetings,

I am creating a web application, which I will be selling licenses to
be able to use it. So Customer Group A, could purchase 3 licenses,
Customer Group B could purchase 30.

With the web app I am using asp.net/vb.net

This means Customer Group A, could only have 3 concurrent users logged
in, and for Customer Group B only 30 at one time.

I am using a username, password, groupID criteria to log in to the
system.

My question is - how do I go about being able to say "ERROR: Customer
Group A already has 3 logged in users - please wait to be able to use
the system".

Obviously, I can't use a literal to store the value at during logon -
because if the person does not click a "log out" button and just
closes the browser, it will not increase the number of available seats
for that group.

I have had ideas with using the global.asax file, with possibly using
the Application_Start/End and/or Session_Start/End in some sort of
combination - but curious to see if anyone out there has any bright
ideas.

Your assistance in anyway would be much appreciated.

-Thanks

Jul 21 '05 #3
Greetings,

From my own hunting around I came to the same conclusion. I am
currently going to store the logged in information in the table - but
please go into more detail of this 'reaper process'.

My big obstacle now is getting the not active users to be removed from
the logged in table in a short amount of time. I can't wait 20
minutes for the seat to open up (i.e. waiting for a session_end event
to fire), nor can I have a 1 minute time out for a web based
application)

So with this 'reaper process' - how about do I go about creating and
checking for active users? Is it a situation where I have some
javascript on my pages causing a reload ever 60 seconds, and having my
time out set two 2 minutes - which doesn't sound very flattering
either.

Please if you can describe this reaper process - as I would love to
hear about it.

Thanks.

"WiseOne" <an*******@discussions.microsoft.com> wrote in message news:<D4**********************************@microso ft.com>...
This is not a bright idea by any stretch of the imagination...you

could store the information for the 3 concurrent users in a db table.
For example, the users are Jimmie, Sam, and Sally. Let's say Sally
logs off. You could have some sort of reaper process running which
would check for live sessions. If it's not live, remove Sally's info
from the db table. You now have an open spot. The good thing about
storing the user info in a db table is you can create an admin app
which would view exactly who is online, their info, etc.
Jul 21 '05 #4
Adam wrote:
Greetings,

I am creating a web application, which I will be selling licenses to
be able to use it. So Customer Group A, could purchase 3 licenses,
Customer Group B could purchase 30.

With the web app I am using asp.net/vb.net

This means Customer Group A, could only have 3 concurrent users logged
in, and for Customer Group B only 30 at one time.

I am using a username, password, groupID criteria to log in to the
system.

My question is - how do I go about being able to say "ERROR: Customer
Group A already has 3 logged in users - please wait to be able to use
the system".

Obviously, I can't use a literal to store the value at during logon -
because if the person does not click a "log out" button and just
closes the browser, it will not increase the number of available seats
for that group.

I have had ideas with using the global.asax file, with possibly using
the Application_Start/End and/or Session_Start/End in some sort of
combination - but curious to see if anyone out there has any bright
ideas.

Your assistance in anyway would be much appreciated.

-Thanks

Possibly that what you need is use a shared or static structure to hold a
count of groups and users. Then when you try to create the Page instance,
you should check. I am thinkin that you should provide the http way of
rejecting a login (403).
I hope this helps
Jul 21 '05 #5

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

Similar topics

1
by: Rick | last post by:
Hello, I have an application created w/ VB6 and I an having trouble installing it on a Windows 2000 SP3 machine that is on a domain. I can install and run the application fine when logged into...
6
by: Gerry Abbott | last post by:
Hi all, Have written some code to limit the concurrent users of a database. Use the Autoexec macro to open a form. When the form opens it increments a value in a table. When the form closes...
0
by: Janning Vygen | last post by:
Hi, i have a question about how to handle postgresql constraint errors in the client app. I found some mails in the archive about it, too. But i have still so many questions about how to do it,...
4
by: Adam | last post by:
Greetings, I am creating a web application, which I will be selling licenses to be able to use it. So Customer Group A, could purchase 3 licenses, Customer Group B could purchase 30. With...
4
by: BARTKO Zoltan | last post by:
Hello folks, First a question and then the rest: Does the PostgreSQL log contain the stored function calls with all parameters? Or is this something that could be set? I would appreciate...
2
by: orp | last post by:
We are developing an ASP.NET 2.0 (C#) application, and I'm having troubles getting the ASP.NET app. to write to the event log when accessing the web site from a separate client computer. Here's...
8
by: GaryDean | last post by:
I have a client with a need for multiple app authentication. The apps are all asp.net apps but may be on different servers. The user just wants a single logon and them be free to use five or six...
0
by: =?Utf-8?B?VHJhY2tz?= | last post by:
I created a setup program in VS2005 ide. It installs my app on 98-Vista. I have tried this with the Click once check box checked(full trust) and not checked does not seem to matter. Anyway, the...
2
by: Steve | last post by:
I've developed a database that will be used by my team (25 people) The database is based on the Resource Planner template The database will reside on a shared drive. What I'd to do now is create...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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.