473,698 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2154
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****@infot ek-consulting.comw rote in message
news:d8******** *************** ***********@m74 g2000hsh.google groups.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
4094
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(); session_destroy(); ?>
2
7440
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 variables still work - just without the option of setting the Timeout property, as I'm assuming? -- / Sean the Mc /
2
2514
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 settings from database. Comments very welcome... I'd like to refine this... besides the error handling I need to add for the db conn... Global.asax --------------- Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) Dim...
0
1446
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
1885
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 the best way to end a session?
15
2128
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. I have a time-out of one minute and indeed, it directs me to the login if i wait to long. The slidingExpiration does it's work also.
6
1657
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
3024
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: Session = "30" Session = "1000" Session = "5" Session = "10" and similar for the other roles. Those values are initially loaded
3
1981
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 moment, but am having problems when a 404 error occurs, i cant access sessionstate. Is writing this code in the global.asax file the best way to do this? I have been searching on the net and hear alot about httphandlers? Will a httphanlder...
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9028
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8895
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2330
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.