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

  • Thread starter Thread starter Andy
  • Start date Start date
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
 
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.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
 
Back
Top