Hi,
Basically I see two options:
1- Use application variables, with a Hashtable and the userID is the key.
2- Use a class with a static Hashtable or similar struct. it will be global
to the application therefore will not expire with the section.
Please note that both solutions assume that you are doing this for
registered users, if you allow anonymous users and treat each session as a
different user you have to do something else.
Cheers,
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Bonj" <anonymous@dotnet.itags.org.discussions.microsoft.com> wrote in message
news:B3D56FFC-CC10-495D-9C62-450DED7D33B2@dotnet.itags.org.microsoft.com...
> I see Session variables time out after 20 minutes (or whatever number of
minutes you define).
> I want to have some variables that won't time out, but they only occupy
very small amounts of data, say 10-20 bytes per user, so I think it won't
too much of a performance impact to store it in the web server's memory.
Would having hash tables as global variables using the SessionID as key work
OK? Global variables and SessionIDs don't time out do they?"Bonj" <anonymous@.discussions.microsoft.com> wrote in message news:B3D56FFC-CC10-495D-9C62-
450DED7D33B2@.microsoft.com...
> I see Session variables time out after 20 minutes (or whatever number of m
inutes you define).
> I want to have some variables that won't time out, but they only occupy very small
amounts of data, say 10-20 bytes per user, so I
think it won't too much of a performance impact to store it in the web serve
r's memory. Would having hash tables as global variables
using the SessionID as key work OK? Global variables and SessionIDs don't ti
me out do they?
It's not the session *variables* that time out, it's the *session* that will
be removed (along with all stored values) after the user has done
nothing (=no new page request) for 20 minutes.
How long do you want to keep this data? Could you store it in
a database?
Hans Kesting
All Session variables expires after 20 (or x minutes you choose) whatever
type they have, also the corresponding SessionID of the expired Session. Use
Application variables to store common variables.
Horatiu Ripa
"Bonj" <anonymous@.discussions.microsoft.com> wrote in message
news:B3D56FFC-CC10-495D-9C62-450DED7D33B2@.microsoft.com...
> I see Session variables time out after 20 minutes (or whatever number of
minutes you define).
> I want to have some variables that won't time out, but they only occupy
very small amounts of data, say 10-20 bytes per user, so I think it won't
too much of a performance impact to store it in the web server's memory.
Would having hash tables as global variables using the SessionID as key work
OK? Global variables and SessionIDs don't time out do they?
You could also look at storing this data in an encrypted cookie. Then you
can set the timeout to whatever you wish with no server overhead.
-mike
MVP
"Bonj" <anonymous@.discussions.microsoft.com> wrote in message
news:B3D56FFC-CC10-495D-9C62-450DED7D33B2@.microsoft.com...
>I see Session variables time out after 20 minutes (or whatever number of
>minutes you define).
> I want to have some variables that won't time out, but they only occupy
> very small amounts of data, say 10-20 bytes per user, so I think it won't
> too much of a performance impact to store it in the web server's memory.
> Would having hash tables as global variables using the SessionID as key
> work OK? Global variables and SessionIDs don't time out do they?
0 comments:
Post a Comment