What's the best way to mirror asp.net session variables acrossservers?

A

Andy

I want to store a key in an ASP.NET session variable that points to an
ASP.NET page cache. The page cache contains an XML document that
holds a draft of the user's work. After the user is finished with
their draft, it gets posted and permenantly saved in the database.

If the session timesout after a few minutes of idlement, the user
doesn't loose their work when the page cache is set to have a far
longer timeout. The user just has to re-establish their session
variable and the key to re-access their page cache.

So far this works on a single server web garden because the asp.net
session variable and the page.cache are available from the same
machine.

If I deploy to a webfarm, what's the best way to get the ASP.NET
session and page cache objects mirrored to the other servers? I want
to advoid using a database solution, and would prefer some way to
recreate the ASP.NET sessions and page caches on all the other
servers, or to have one server dedicated to session and page cache
objects which the others share.

Is there any way to do this?

Andy
 
G

Gregory A. Beamer \(Cowboy\) - MVP

You can move session to a centralized server, either with a session state
server or SQL Server. That will solve the session side of the coin.

Have you considered setting up temp tables for when a session times out and
persisting the data there? Just mirror the necessary elements from the place
the doc will ultimately be saved and store each time they work. If
necessary, you can ensure it is thrown into the table on session end.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,698
Latest member
LydiaHalle

Latest Threads

Top