473,563 Members | 2,797 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1197
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
2159
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
1539
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 yes/no. After saving the documents,the form is refreshed. At this point, if the checkbox has been saved with checked, it shows unchecked, if it has been...
4
1843
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 ecommerce site. We aren't selling anything but we have a notion of a cart where you add schedule items. You can perform actions such as add/edit/remove...
6
1999
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 patch which allows the following: grant select on ":2" to ":1" \for select usename, relname from pg_catalog.pg_user, pg_catalog.pg_class where...
15
4577
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 communicate with a MySQL database table on a web server, from inside of my company's Access-VBA application. I know VBA pretty well but have never...
16
2513
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 uses IE to talk with a server. The user on the client (IE) sees an ASP net page containing a TextBox. He can write some text in this text box and...
18
2315
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. Here's the scenario: We have a base class with all virtual functions. We'll call this the Animal class. We then make two classes Fish and Bird...
7
2284
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 files on harddisk there's a node into n- tree, this solution is not good for large hard disk.. and i can't use inotify (it's forbidden), and only c...
2
2467
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 engineering (at last year) " plz help me
0
7583
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
7888
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7642
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
7950
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
6255
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
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
3643
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...
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.