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

Counting active users when using sessionState mode=StateServer ?

The subject says it all, more or less.
With sessionState mode=InProc in web.config this works fine, using this
approach in the global.asax:

In the session_start event the count up:
Application["UserCount"]=(int)Application["UserCount"]+1;

In the session_end event the count down:
Application["UserCount"]=(int)Application["UserCount"]-1;

However, with sessionState mode=StateServer, the session_end does not fire,
so a workaround has to be appended.
I just haven't found the best approach yet. I have tried one suggestion,
where another event was added to the global.asax
(Application_PreRequestHandlerExecute) where the reading of the current
userID stored in a session var was a part of the idea. However, I got an
error message, saying the "session is not available...." or something like
that. Then I tried to implement a needed Http module in the web.config for
this, but obviously I got rather lost with other error messages about wrong
assembly.

So, before I stumble more in half blindness, I would be happy for any
pointing directive.

Thanks.

Bjorn
Jun 27 '08 #1
0 1267

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

Similar topics

0
by: Jeffry van de Vuurst | last post by:
Hi, I have a page with EnableSessionState=readonly in the page directive. A couple of strange things happen. When I try to add something to the session, I get no exception. Immediately after...
1
by: Seth Broomer | last post by:
I am losing my session state for some reason randomly and i don't know why i store just simple things like an id for the user, and their username, etc. maybe 10 items per user it happens about...
2
by: Dhaval Mehta | last post by:
Thanks in advance I want sessions information for the asp .net application ( mainly SessionId). I am using Oracle as back end. I have sessionid using Session.SessionID in asp .net. I am gettin...
8
by: GeekBoy | last post by:
I understand the benefit of pushing the StateServer process onto another computer to "balance" the load and take some cpu and memory usage off the web server, but how much could it possibly help?...
10
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much...
0
by: Joer996 | last post by:
I am using StateServer and URIs to manage state. Here is my web.config line <sessionState mode="StateServer" stateConnectionString="tcpip=localhost:42424" cookieless="UseUri" timeout="500"/> ...
4
by: archana | last post by:
Hi all, I am new to web services. I am using stateserver to stored data which i set using session. I changed mode in web.config file to StateServer. But didn't change tcipip address. I kept...
0
by: Med | last post by:
Hi, My Settings in web.config: <sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1; Trusted_Connection=yes"...
4
by: tim007 | last post by:
Hi, How can we get tthe number of active users connected to our web application. I have added application varible that gets incrimeted at session_start and then is decreased at session_end ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.