473,785 Members | 2,639 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to find out all active sessions in the asp.net web server??

Hi all,

How to find out no of active sessions (at a time) in the web
server.. I dont think handling Session_start and Session_end events
are useful for this. Is there any way to find all current active
sessions by using Application object ?

Thanx,
Krish....

Feb 16 '07 #1
2 12151
On Feb 16, 6:57 am, "Krish......... .." <conckr...@gmai l.comwrote:
Hi all,

How to find out no of active sessions (at a time) in the web
server.. I dont think handling Session_start and Session_end events
are useful for this. Is there any way to find all current active
sessions by using Application object ?

It can be done via Application level object/collection, each of the
session objects can be counted on Session_OnStart and deleted on
Session_OnEnd. However, Session_OnEnd is unreliable and this approach
(if with no any additional logic, e.g. checking the time expired)
could give you wrong number of session. Because of this, and if you
need to be more accurate, you can add the new sessions in the database
table (sessionID and time) and query this table.

Feb 16 '07 #2
Good morning,

In addition to Alexey's reply, if you already use SQL server ession state,
it's very easy to count sessions (see my reply in this thread:
http://msdn.microsoft.com/newsgroups...-33a9fb4036f9).
Otherwise (in/out-process session management), you have to stick to session
logging in database as Alexey pointed out.
--
Milosz
"Alexey Smirnov" wrote:
On Feb 16, 6:57 am, "Krish......... .." <conckr...@gmai l.comwrote:
Hi all,

How to find out no of active sessions (at a time) in the web
server.. I dont think handling Session_start and Session_end events
are useful for this. Is there any way to find all current active
sessions by using Application object ?


It can be done via Application level object/collection, each of the
session objects can be counted on Session_OnStart and deleted on
Session_OnEnd. However, Session_OnEnd is unreliable and this approach
(if with no any additional logic, e.g. checking the time expired)
could give you wrong number of session. Because of this, and if you
need to be more accurate, you can add the new sessions in the database
table (sessionID and time) and query this table.

Feb 16 '07 #3

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

Similar topics

0
3454
by: Amol Shambharkar | last post by:
Hello Everyone, I am hoping someone could help me out with this.I am using Visual Studio .NET 2003 to create a web application on a remote IIS 5.0 server using the File Share web access method.The problem is I get the following two errors everytime I try to create the application: Error 1: The web was created successfully, but an error occured trying to configure the application root of this web.Web projects may not operate correctly...
0
2879
by: Laurent Liegeois | last post by:
how to see the active sessions in the web server IIs in c# or Vb ? -=zoltux=- *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
2
4252
by: Chris Hayes | last post by:
Is it possible to iterate through all the active sessions of an ASP.net application? I have this fancy user object (with all kinds of properties) that I set as a session level object on session start and I'd like to be able to find a specific user's session so that I can make modifications to the fancy user object (ie. add a note to the session, or change some properties within it, or even end/kill the session!). So simply put is...
2
1418
by: Brad B. | last post by:
I am trying to enforce a licence for my web application based on the number of active sessions. Each time a new user accesses the app, I want to check this to see if over the limit. Unfortunately, Can't find a way to check this in ASP.NET. Looked at performanceCounters but have not had any success there. Anyone got any ideas?
2
2149
by: Marcio Kleemann | last post by:
Is there a way to get a list of the session id's for all currently active sessions for the application? Thanks
4
1693
by: Christina N | last post by:
Can anyone give me a code example of how to use a global array to keep track of all active sessions (their sessionid, logontime, etc)? I need a code example, not a prosa description of what to do.. Anyone..? Best regards, Christina
2
1804
by: Lenn | last post by:
Hello, This requirement might seem strange to someone out there, but here it's We need to make sure only certain number of users can be logged in the site at the same time. Is there any way to do that in ASP.NET, in web config file or otherwise. Thanks in advance for your help.
0
951
by: Atul | last post by:
Hi, Is there any way to find out active sessions of a .NET 1.1 web application? Any help would be highly appreciated. Thanks Atul
1
7140
by: Ming | last post by:
Hi all, I wonder if there is a way to kill all active sessions. Basically, I want to have a page, for example, foo.php. Whenever users visit this page, regardless of where they come from, all sessions that are from my site will be destroyed. Thanks,
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10336
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10155
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10095
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8978
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5383
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
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
2
3655
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.