|
-
February 24th, 2006, 12:40 PM
#1
View logged users and the session variables
Hi !!!
I'd like to get, from my application server, a list of the logged users with these details: application they are logged in and state of Session variables.
For instance:
User: John
Application: TimeTables
Session variables: id_user=12 | blnShowAll=false | ...
User: Martin
Application: SalesTracking
Session variables: id_customer=0 | bestcolor=green | ...
How could I do this ???
Thanks in advance for ideas !!!
-
February 24th, 2006, 02:04 PM
#2
Re: View logged users and the session variables
That is to say, if there's a possibility to watch ALL the Session objects of all the users...
-
February 24th, 2006, 04:20 PM
#3
Re: View logged users and the session variables
Have you thought about creating a shared class?
maybe something like:
Code:
Namespace your.namespace
Private Shared Users(0) as Long
Public Class Users
Sub Add(ByVal UserID as Integer)
Dim iUBound as Integer = Users.GetUpperBound
ReDim Preserve Users(iUBound + 1)
Users(iUBound + 1) = UserID
End Sub
End Class
End Namespace
So in your page, you would need to include this namespace.. Then call it like this:
PHP Code:
<%@ Imports Namespace name="your.namespace">
<%your.namespace.Users.Add(3) %>
<html>
<body> etc
Well something like that... havent tested it or anything, and its friday night.... beer time
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rich Cook
0100 1101 0110 1001 0110 0011 0110 1000 0110 0001 0110 0101 0110 1100 0010 0000 0100 0101 0110 1100 0110 1100 0110 0101 0111 0010
-
February 27th, 2006, 08:52 AM
#4
Re: View logged users and the session variables
I'm sorry, I can't see how that code helps me to watch the Session variables of the users...
I can watch the Session object of my application and all the values that it contains:
Code:
for (int i = 0; i < Session.Keys.Count; i++)
Response.Write (Session.Keys[i].ToString ());
I need something like this but for every Session State in the Web Server...
-
February 27th, 2006, 10:34 AM
#5
Re: View logged users and the session variables
Are your session variables cookie-based? If so, you can't look at them all at once, as they are stored on different client machines.. If you were to change to sql-server maintained sessions, it would be a case of checking the database table. But you loose your Session_Ended event of global.asax
Last edited by HairyMonkeyMan; February 27th, 2006 at 10:37 AM.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rich Cook
0100 1101 0110 1001 0110 0011 0110 1000 0110 0001 0110 0101 0110 1100 0010 0000 0100 0101 0110 1100 0110 1100 0110 0101 0111 0010
-
February 27th, 2006, 10:43 AM
#6
Re: View logged users and the session variables
I keep session variables in mode="StateServer"
-
February 27th, 2006, 11:09 AM
#7
Re: View logged users and the session variables
What type of StateServer / webfarm software are you running?
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rich Cook
0100 1101 0110 1001 0110 0011 0110 1000 0110 0001 0110 0101 0110 1100 0010 0000 0100 0101 0110 1100 0110 1100 0110 0101 0111 0010
-
February 27th, 2006, 11:28 AM
#8
Re: View logged users and the session variables
I'm runing a ASP.Net webform...
I now session avriables can be stored InProc, StateServer (a server service) or SqlServer...
I found that, enabling tracing, in http://localhost/MyApp/trace.axd there's a detail of the requests... Maybe it's possible to programatically filter this data and get only the session variables?
Thanks for ideas !!!
-
December 16th, 2006, 09:44 AM
#9
Re: View logged users and the session variables
I too have been looking for a solution to this problem for a LONG time already. seems that this cannot be done at all
-
December 16th, 2006, 10:04 AM
#10
Re: View logged users and the session variables
In general it is made difficult for security reasons. While monitoring all of the sessions may be useful for debugging or other diagnostic purposes, it rarely has a place in a production system.
That being said, the easiest way to do this is to structure your app so that the session information is shadowed to another location. But you need to be careful as this will create an additional reference and may hinder garbage collection.
If there are specific peices of information that you are conserned about, then storing (or logging) them independantly is probably a better alternative.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|