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

Read session data of all users

Hi all,

Is there a way to read other people's session variables?
I understand it makes sense that session state is on per-user basis, but
still...
Is there a way to get a collection of all current HttpSessionState objects
on the server, or at least get a reference to a HttpSessionState objects by
session ID ?
Thanks.

-Oleg.
Nov 19 '05 #1
5 2425
Yes. You can. But I am not sure if you can do it through any available
API.

Here's one suggestion:

1. Persist the session in database.
2. Use the session-ID to get the data from database.

But you will need to get it and parse it on your own. AFAIK, there's
no direct API available.

--
Cheers,
Gaurav Vaish
http://www.mastergaurav.org
http://mastergaurav.blogspot.com
--------------------------------

Nov 19 '05 #2
What is the goal from a non technical point of view ? Knowing the whole
picture may sometimes yield to better suggestions...
What kind of particular information do you need for all users ?

Patrice

--

"Oleg Ogurok" <ol**@ogurok.com.ihatespammers.ireallydo.co> a écrit dans le
message de news:11*************@corp.supernews.com...
Hi all,

Is there a way to read other people's session variables?
I understand it makes sense that session state is on per-user basis, but
still...
Is there a way to get a collection of all current HttpSessionState objects
on the server, or at least get a reference to a HttpSessionState objects by session ID ?
Thanks.

-Oleg.

Nov 19 '05 #3
Thanks Patrice,

I'm trying to come up with a better way to authenticate a user across
different web applications from a central place. E.g. people accessing app2
and app3 will be redirected to authenticate with app1 if their session
expires. I'm passing encrypted SessionID within URL when redirecting users
between applications.

Right now I have a separate DB table with sessions. I'm wondering if there
is a way to reuse the existing ASP.NET functionality related to
Sessions/Forms Authentication.

"Patrice" <no****@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
What is the goal from a non technical point of view ? Knowing the whole
picture may sometimes yield to better suggestions...
What kind of particular information do you need for all users ?

Patrice

--

"Oleg Ogurok" <ol**@ogurok.com.ihatespammers.ireallydo.co> a écrit dans le
message de news:11*************@corp.supernews.com...
Hi all,

Is there a way to read other people's session variables?
I understand it makes sense that session state is on per-user basis, but
still...
Is there a way to get a collection of all current HttpSessionState
objects
on the server, or at least get a reference to a HttpSessionState objects

by
session ID ?
Thanks.

-Oleg.


Nov 19 '05 #4
There is two separate issues here IMO...

Try :
http://msdn.microsoft.com/library/de...plications.asp
It should show how to share the ASP.NET Form authentication between several
applications and/or servers...
This is just for the authentication part.

Now for the session variables themselves you have several options :
- having a DB (such as now ? not clear if it is for session variables or
just to implement SSO)
- using the ASP.NET State Server (both are supported by changing the .NET
configuration file)

Note that the option of having each application using its own unique set of
session variables is not always obviously out. For example if each
application only need its own variables and perhaps uses only few mainly
"readonly" ones (such as a user id or stuff like that), it could still work
even though session variables are not shared accross applications...

In all cases, IMO it's not needed to read variables accross sessions. You
just need to access the current session.

Patrice

--

"Oleg Ogurok" <ol**@ogurok.com.ihatespammers.ireallydo.co> a écrit dans le
message de news:11*************@corp.supernews.com...
Thanks Patrice,

I'm trying to come up with a better way to authenticate a user across
different web applications from a central place. E.g. people accessing app2 and app3 will be redirected to authenticate with app1 if their session
expires. I'm passing encrypted SessionID within URL when redirecting users
between applications.

Right now I have a separate DB table with sessions. I'm wondering if there
is a way to reuse the existing ASP.NET functionality related to
Sessions/Forms Authentication.

"Patrice" <no****@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
What is the goal from a non technical point of view ? Knowing the whole
picture may sometimes yield to better suggestions...
What kind of particular information do you need for all users ?

Patrice

--

"Oleg Ogurok" <ol**@ogurok.com.ihatespammers.ireallydo.co> a écrit dans le message de news:11*************@corp.supernews.com...
Hi all,

Is there a way to read other people's session variables?
I understand it makes sense that session state is on per-user basis, but still...
Is there a way to get a collection of all current HttpSessionState
objects
on the server, or at least get a reference to a HttpSessionState
objects by
session ID ?
Thanks.

-Oleg.



Nov 19 '05 #5
Thanks. Unfortunately, this (MSDN) method doesn't work for authenticating
accross applications located on different servers with different URLs, e.g.
http://server1.domain.com/app1, http://server2.anotherdomain.com/app2

I think I'll stick with a DB. I don't really need to implement session data
transfer, just SSO. E.g. both applications need to know the ID of the user
currently logged in, but that's about it.

-Oleg.

"Patrice" <no****@nowhere.com> wrote in message
news:OY*************@TK2MSFTNGP10.phx.gbl...
There is two separate issues here IMO...

Try :
http://msdn.microsoft.com/library/de...plications.asp
It should show how to share the ASP.NET Form authentication between
several
applications and/or servers...
This is just for the authentication part.

Now for the session variables themselves you have several options :
- having a DB (such as now ? not clear if it is for session variables or
just to implement SSO)
- using the ASP.NET State Server (both are supported by changing the .NET
configuration file)

Note that the option of having each application using its own unique set
of
session variables is not always obviously out. For example if each
application only need its own variables and perhaps uses only few mainly
"readonly" ones (such as a user id or stuff like that), it could still
work
even though session variables are not shared accross applications...

In all cases, IMO it's not needed to read variables accross sessions. You
just need to access the current session.

Patrice

--

"Oleg Ogurok" <ol**@ogurok.com.ihatespammers.ireallydo.co> a écrit dans le
message de news:11*************@corp.supernews.com...
Thanks Patrice,

I'm trying to come up with a better way to authenticate a user across
different web applications from a central place. E.g. people accessing

app2
and app3 will be redirected to authenticate with app1 if their session
expires. I'm passing encrypted SessionID within URL when redirecting
users
between applications.

Right now I have a separate DB table with sessions. I'm wondering if
there
is a way to reuse the existing ASP.NET functionality related to
Sessions/Forms Authentication.

"Patrice" <no****@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
> What is the goal from a non technical point of view ? Knowing the whole
> picture may sometimes yield to better suggestions...
> What kind of particular information do you need for all users ?
>
> Patrice
>
> --
>
> "Oleg Ogurok" <ol**@ogurok.com.ihatespammers.ireallydo.co> a écrit dans le > message de news:11*************@corp.supernews.com...
>> Hi all,
>>
>> Is there a way to read other people's session variables?
>> I understand it makes sense that session state is on per-user basis, but >> still...
>> Is there a way to get a collection of all current HttpSessionState
>> objects
>> on the server, or at least get a reference to a HttpSessionState objects > by
>> session ID ?
>> Thanks.
>>
>> -Oleg.
>>
>>
>
>



Nov 19 '05 #6

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

Similar topics

4
by: francis70 | last post by:
Hi, I have these 2 problem? Is there a way in Oracle to read UNCOMMITED data. i.e. in Oracle the normal behaviour is that a user's updates to a table are visible to other users ONLY when the...
11
by: Markus Breuer | last post by:
I have a question about oracle commit and transactions. Following scenario: Process A performs a single sql-INSERT into a table and commits the transaction. Then he informs process B (ipc) to...
1
by: Scott Wickham | last post by:
I'm having a problem saving session information on one form and retrieving it on a subsequent form...for only one out of a number of users. Actually, I'm not absolutely certain it's a session...
3
by: Marcus | last post by:
Hello all, I have written numerous functions that check all user entered data on my site via POST and GET. My question is this: once my data checks out as being valid, I sometimes store it in...
11
by: Vishal | last post by:
Hello, can anybody tell me how I can extend the session expiry time? Is it done via code or via IIS? Sorry I am new and dont know about this.
4
by: danman226 | last post by:
I will be using a companyname, user name, and password to authenicate users in my system. I am trying to save the company name in the session for later use. I cannot access the Session object in...
14
by: Lauri Kotilainen | last post by:
Hi, I've already tried several avenues for this, and am quite stumped. The issue I'm facing is a weird case of sessions getting mixed up (ie. users seeing each others' data). Apparently this...
2
by: Michaelk | last post by:
Can somebody tell me how many Session variables would be considered exessive, and when they start really affect the server speed. For example on 20-30 asp pages I need to use about 200-300 session...
43
by: davidkoree | last post by:
I mean not about cookie. Does it have something to do with operating system or browser plugin? I appreciate any help.
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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
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,...
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
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...
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...
0
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,...

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.