one session does not have access to another. but you have several options.
you could serialze out the session data that applies to a user, and store it
in a db rather than session. if you want in memeory, store references to the
user session objects in a static hashtable, application object, or
application cache.
-- bruce (sqlwork.com)
| Thanks for the article, it's very interesting.
|
| I know about the session timeout. The problem is little bit different. I
| don't need cookies. The idea is if the client wants for some reason to use
| another machine and uses his login then I need to "transfer" his session
to
| this new machine, i.e. copy the information stored in some
| Sesson["SomeObject"] to another session and then finally start this
session.
| The previous one should be eliminated at the same time. If the timeout
| occured then the Session[] should be serialized and stored on the database
| to restore again whenever the client needs that. That's why I need to know
| if it's possible and how if yes to copy data from the previous session to
a
| new one.
|
| Just D.
|
| | > Just D. wrote:
| >> Do we have any access to the Session[] object from a different Session?
| >> The idea is to save Session[] of a current user and then if he logs in
| >> again then return the Session back. It's not a problem to store, there
is
| >> only one complicated object in this Session[], but to get it on
| >> SessionStart to make a copy this is a problem.
| > The session configuration element in web.config has a timeout attribute
| > which controls how long a session is considered valid. The session
timeout
| > is a sliding value; on each request the timeout period is set to the
| > current time plus the timeout value.
| > If you need the session to be valid "forever", like session at
Amazon.com
| > or similar, you should use SQL Server Mode. In SQL Server Mode the
session
| > data is kept in the database.
| >
| > For good coverage of session state in ASP.NET read Rob Howards MSDN
| > article on the topic
| >
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspnet/html/asp12282000.asp
| >
| > ASP.NET 2.0, which is released later this year, has a Profile API. This
| > API lets you define profile data which is automatically persisted for
both
| > authenticated and anonymous users between visits to a web site.
| >
| > Anders Norås
| >
http://dotnetjunkies.com/weblog/anoras/
|
|