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

Way to limit total number of sessions from one IP address

In trying to improve the throughput of a classic ASP app I wrote last
year, I added monitoring to the application and session start and end
methods. For one, I'm counting the total number of sessions and the
high water mark. My monitoring has revealed a few interesting things.

1. The ASP application is being shutdown and restarted almost daily.
The hosting company swears that neither the machine (shared server)
nor IIS nor the application is being restarted. Is there any other way
the Application_OnStart and _OnEnd methods might be invoked?

2. I found in the app log that apparently one invocation of the app
was being shutdown while a new one was being started; i.e. the Startup
event for the new run was logged before the Shutdown Complete event
was logged (in the same file) for the old run. How is this possible?

3. At one point, about 40 new sessions were started up from one given
IP address, with 5-10 seconds between start events being logged. Does
this happen if the user has his browser's cookies disabled? How else
might this happen (except perhaps for deliberate DoS-style hacking)?

4. Because of (3) above, I think I want to limit the number of
concurrent sessions originating from a given IP address (I already
keep an application-level array that tracks the IP addresses of all
active sessions). To be least annoying to the end user, I presume I'd
want to kill older sessions rather than not allow newer sessions (in
case of browser crashing, for example). Is there a way to kill another
session by ID, or to instruct another session to kill itself?

Thanks
tbone
Jan 30 '06 #1
2 2297
> 3. At one point, about 40 new sessions were started up from one given
IP address, with 5-10 seconds between start events being logged. Does
this happen if the user has his browser's cookies disabled? How else
might this happen (except perhaps for deliberate DoS-style hacking)?

4. Because of (3) above, I think I want to limit the number of
concurrent sessions originating from a given IP address (I already
keep an application-level array that tracks the IP addresses of all
active sessions). To be least annoying to the end user, I presume I'd
want to kill older sessions rather than not allow newer sessions (in
case of browser crashing, for example). Is there a way to kill another
session by ID, or to instruct another session to kill itself?


I think limiting the # of sessions is a backwards way of fixing this.
There's no reason your app should be shutting down in the first place.

But if you insist, the only way I can think of it is to save IP address
and Session ID in a database on the home page.

Then on each subsequent page, you need to check to see if they still
match. If they don't, a newer session has been introduced, and you
could push the user to a "session timed out" page.

Jan 31 '06 #2
"Larry Bud" wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
:> 3. At one point, about 40 new sessions were started up from one given
: > IP address, with 5-10 seconds between start events being logged. Does
: > this happen if the user has his browser's cookies disabled? How else
: > might this happen (except perhaps for deliberate DoS-style hacking)?
: >
: > 4. Because of (3) above, I think I want to limit the number of
: > concurrent sessions originating from a given IP address (I already
: > keep an application-level array that tracks the IP addresses of all
: > active sessions). To be least annoying to the end user, I presume I'd
: > want to kill older sessions rather than not allow newer sessions (in
: > case of browser crashing, for example). Is there a way to kill another
: > session by ID, or to instruct another session to kill itself?
:
: I think limiting the # of sessions is a backwards way of fixing this.
: There's no reason your app should be shutting down in the first place.
:
: But if you insist, the only way I can think of it is to save IP address
: and Session ID in a database on the home page.
:
: Then on each subsequent page, you need to check to see if they still
: match. If they don't, a newer session has been introduced, and you
: could push the user to a "session timed out" page.

Isn't this a problem for multiple NAT or proxy users?

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Feb 3 '06 #3

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

Similar topics

0
by: krystoffff | last post by:
Hi I would like to paginate the results of a query on several pages. So I use a query with a limit X offset Y to display X results on a page, ok. But for the first page, I need to run the...
5
by: Nick | last post by:
Is there a (better) way to get the toal number of results from a query but still limit them with a LIMIT clause. For example, in a Google search result, it displays 1-100 of 10,000,000 results. Do...
2
by: msnews | last post by:
Hi All, We have a requirement to display total number of current users using the site. We want to display only the total no other information. And this value needs to change dynamically. Is it...
2
by: Dennis | last post by:
The documentation from M'soft for the limits on SQL Server DataBase is: "SQL Server can have as many as two billion tables per database and 1,024 columns per table. The number of rows and total...
4
by: Bill | last post by:
Hi, I would be grateful if someone could clarify my rather confused ideas of the 10 connection limit on XP/2000 when its being used as a server. (I realise that XP is really a client op sys with...
2
by: HarisHohkl | last post by:
Hi, I've this function in a class to update the total value.but when i try to remove the these row highlight in Bold it crash, what should i do???? void display_total_value() { double...
32
by: Nu | last post by:
I want to protect myself from if someone with a fast connection hammers my site. It's not denial of service attacks, but offline downloaders (of course that don't show they're offline downloaders...
7
by: Remote_User | last post by:
Hi All, I have my ASP.NET application hosted in COM+ and I have my client app. Is there any way I can limit the number os sessions? Say, I have 5 client requests and they instantiate 5 COM+...
1
by: deshaipet | last post by:
Hi friends - I created a automatic storage tablespace with a pagesize of 16 K and initial size of 64 MB. create large tablespace test_tbsp1 pagesize 16k managed by automatic storage autoresize...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.