473,320 Members | 2,080 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,320 software developers and data experts.

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

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
Oct 23 '08 #1
1 2134
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! |
********************************************
"Andy" <an****@infotek-consulting.comwrote in message
news:d8**********************************@m74g2000 hsh.googlegroups.com...
>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

Oct 23 '08 #2

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

Similar topics

1
by: sg | last post by:
Hi, I use sessions on my site and i have an admin page where I want to be able to unset all session variables and destroy the session. for the moment I do : <? session_unset();...
2
by: What-a-Tool | last post by:
I am using a couple of session variables in my site. From what I can figure out, session information is stored on the users computer in a cookie - If the user has cookies disabled, do session...
2
by: Max | last post by:
This is the best method I've found to store and load settings from database. I load the settings once at start as public variables. The method can be called easily anytime you want to load the new...
0
by: Alexander Widera | last post by:
hello all, i have a problem ... like I already discussed in the thread "session empty" I have the following problem: I created a completely new web... i added 2 files: sessiontest1.aspx:
4
by: Hugo Flores | last post by:
Hi all, I noticed that there are three methods that can remove session variables Session.Clear() Session.RemoveAll() Session.Abandon() Now my question as is stated on the subject, what is...
15
by: Edwin Knoppert | last post by:
I have searched but info is limitted. In my test app i used a non persistant cookie for forms authentication. slidingExpiration is set to true On run and close and rerun the login remains ok....
6
by: The Colonel | last post by:
In a .vb class function, can I assign user-specific information (e.g. First Name, Role, etc.) to local variables (as opposed to referring to the session variable multiple times)?
11
by: john_c | last post by:
I'd like to store information for roles in Session variables. RoleA has a specific set of values, RoleB has a specific set and so one. When I access values for RoleA, it looks like this: ...
3
by: Nemisis | last post by:
Guys, I would like to write a error handler, or something, that will allow me to write to a database when an error occurs on my site. I am trying to implement this in the global.asax file a the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.