473,402 Members | 2,053 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,402 software developers and data experts.

I need an idea

I am supposed to implement a web app in C#/.NET and it needs to be
installed on the customer's server and ran from anywhere. The problem
is this software needs to be licensed by user (i.e. they buy 2
licenses, only 2 sessions should be open at a time). I can currently
see how many sessions are active, but I need a way to tighten this up
where when they close their browser it frees up a session and it also
can run long queries so it would be nice that as long as the window is
open the session remains active. I know it can be done but I don't
have a clue how. (I think that's how myspace does it) Any suggestions
would be great

Thanks,
-Seth

Aug 16 '06 #1
4 1190
I think your best bet is to allow a third session to be opened at any time but it invalidates the oldest open session,
i.e. session 3 ends session 1.

mnichols

Mr Seth T wrote:
I am supposed to implement a web app in C#/.NET and it needs to be
installed on the customer's server and ran from anywhere. The problem
is this software needs to be licensed by user (i.e. they buy 2
licenses, only 2 sessions should be open at a time). I can currently
see how many sessions are active, but I need a way to tighten this up
where when they close their browser it frees up a session and it also
can run long queries so it would be nice that as long as the window is
open the session remains active. I know it can be done but I don't
have a clue how. (I think that's how myspace does it) Any suggestions
would be great

Thanks,
-Seth
Aug 16 '06 #2
I didn't even know sessions could terminate each other. I forgot to
add that this doesn't have to be done with sessions, it can be using
our database or whatever else someone could think of, and the number of
allowed users will need to be changed if the customer buys more
licenses.

Thanks again,
-Seth

mnichols wrote:
I think your best bet is to allow a third session to be opened at any time but it invalidates the oldest open session,
i.e. session 3 ends session 1.

mnichols

Mr Seth T wrote:
I am supposed to implement a web app in C#/.NET and it needs to be
installed on the customer's server and ran from anywhere. The problem
is this software needs to be licensed by user (i.e. they buy 2
licenses, only 2 sessions should be open at a time). I can currently
see how many sessions are active, but I need a way to tighten this up
where when they close their browser it frees up a session and it also
can run long queries so it would be nice that as long as the window is
open the session remains active. I know it can be done but I don't
have a clue how. (I think that's how myspace does it) Any suggestions
would be great

Thanks,
-Seth
Aug 16 '06 #3
- Ending a session when a user closes a browser window is simply not a realistic option too much can go wrong, the web is stateless, etc.
- It isn't so much that one Session would end another. It's more that a session would consider itself valid or invalid based on another value.
- That value would be a list of Session Ids in either the Application[] array or a DB - your choice.
- Each Session would have a last access timestamp associated with it.
- When a user starts a new session invalidate the least recently used SessionId
- When a request comes in with an invalidated SessionId redirect it to a SessionEnded or Logon page

mnichols
Mr Seth T wrote:
I didn't even know sessions could terminate each other. I forgot to
add that this doesn't have to be done with sessions, it can be using
our database or whatever else someone could think of, and the number of
allowed users will need to be changed if the customer buys more
licenses.

Thanks again,
-Seth

mnichols wrote:
>I think your best bet is to allow a third session to be opened at any time but it invalidates the oldest open session,
i.e. session 3 ends session 1.

mnichols

Mr Seth T wrote:
>>I am supposed to implement a web app in C#/.NET and it needs to be
installed on the customer's server and ran from anywhere. The problem
is this software needs to be licensed by user (i.e. they buy 2
licenses, only 2 sessions should be open at a time). I can currently
see how many sessions are active, but I need a way to tighten this up
where when they close their browser it frees up a session and it also
can run long queries so it would be nice that as long as the window is
open the session remains active. I know it can be done but I don't
have a clue how. (I think that's how myspace does it) Any suggestions
would be great

Thanks,
-Seth
Aug 16 '06 #4
I am at a point now where I need to work on this, and I still don't
have a good idea of how I am going to do it. -->mnichols idea--I
don't think I can close open sessions at all, I need the sessions to
stay open, and close out anyone who would try to open a new one that is
out of the licensed amount.

I have an idea of shortening the session timeout to around 2 min. and
have my master page run JavaScript that would ping the server every 30
secs so that I just use the built in session management, have the
master page keep track of how many open session there are, and if a
session is accidentally lost, the user would only wait a max of 2 min.
The problem with that is the pining. I don't know how obtrusive/ that
would be to the application to have JavaScript ping every 30 secs. I
would like some insight on what someone thinks about that to.

-Again, thx for any help
Seth

mnichols wrote:
- Ending a session when a user closes a browser window is simply not a realistic option too much can go wrong, the web is stateless, etc.
- It isn't so much that one Session would end another. It's more that a session would consider itself valid or invalid based on another value.
- That value would be a list of Session Ids in either the Application[] array or a DB - your choice.
- Each Session would have a last access timestamp associated with it.
- When a user starts a new session invalidate the least recently used SessionId
- When a request comes in with an invalidated SessionId redirect it to a SessionEnded or Logon page

mnichols
Mr Seth T wrote:
I didn't even know sessions could terminate each other. I forgot to
add that this doesn't have to be done with sessions, it can be using
our database or whatever else someone could think of, and the number of
allowed users will need to be changed if the customer buys more
licenses.

Thanks again,
-Seth

mnichols wrote:
I think your best bet is to allow a third session to be opened at any time but it invalidates the oldest open session,
i.e. session 3 ends session 1.

mnichols

Mr Seth T wrote:
I am supposed to implement a web app in C#/.NET and it needs to be
installed on the customer's server and ran from anywhere. The problem
is this software needs to be licensed by user (i.e. they buy 2
licenses, only 2 sessions should be open at a time). I can currently
see how many sessions are active, but I need a way to tighten this up
where when they close their browser it frees up a session and it also
can run long queries so it would be nice that as long as the window is
open the session remains active. I know it can be done but I don't
have a clue how. (I think that's how myspace does it) Any suggestions
would be great

Thanks,
-Seth
Aug 22 '06 #5

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

Similar topics

6
by: Robert Maas, see http://tinyurl.com/uh3t | last post by:
System login message says PHP is available, so I tried this: http://www.rawbw.com/~rem/HelloPlus/h.php It doesn't work at all. Browser just shows the source. What am I doing wrong?
11
by: Jack | last post by:
I have a asp form where among others there are few text boxes and one check box. The checkbox is to indicate whether the entry is final. The checkbox is attahced to a field in table of type...
4
by: nsr93 | last post by:
I am not sure if this was the proper group to post this, but here is my question: I am a Java consultant. I have new client I am working for to make a web based application similar to an...
6
by: Martijn van Oosterhout | last post by:
I've had some fun in the past where I've had to grant a lot of tables and other similar system commands. Unfortunatly, you can't use queries to fill in fields for you. Anyway, I've implemented a...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
16
by: pamelafluente | last post by:
I am still working with no success on that client/server problem. I need your help. I will submit simplified versions of my problem so we can see clearly what is going on. My model: A client...
18
by: bsruth | last post by:
I tried for an hour to find some reference to concrete information on why this particular inheritance implementation is a bad idea, but couldn't. So I'm sorry if this has been answered before....
7
by: elgiei | last post by:
Good morning at all, i have to implement a server,that every n-seconds (eg. 10sec) sends to other clients,which files and directory has been deleted or modified. i build a n-tree, for each...
2
by: haytham2008 | last post by:
Hello ... Hi everybody i need an idea to make mobile application that do some thing i need only the idea to what that program to do i need it as final project in my study "im computer...
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...
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
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...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.