ASP SessionId

D

Dave

Hi all, we are implementing WSDPro here for load
balancing. So, when someone comes in they may get
redirected to www1.domain.com, www2.domain.com, etc. When
they first come in, they hit www.domain.com, and then get
redirected to 1, 2, 3 , etc. The problem is, in our
solution, we are setting a session variable before the
redirect, and are losing it as the SessionID is changing
because it is acting like we are changing servers. It is
my understanding that the SessionID is really just a
cookie, and since other cookies can have their domain
changed, this one should as well. Something
like .Domain=".domain", which should handle everything in
from of the domain. We ahve tried to change this in the
Global.asa and got a "you can't do this error", 162 I
believe.

Does anyone have any ideas as to how we can change the
domain of the SessionID to get around this problem? I
hope I explained it well enough, and thanks in advance.

Dave
 
M

Mark Schupp

Sessions cannot be transferred between server in traditional ASP because
session data is stored in memory on the originating server. The session
cookie just contains an identifier (and the identifier is not unique across
servers).

There are a number of alternatives (including 3rd-party session replacement
components).

Is the user actually re-directed to another server (URL change in browser
address box, all subsequent requests go to a specific server) or will the
browser always see www.domain.com?

If the user is actually re-directed then put your session data in hidden
form elements and rebuild the session on the target server.

If load-balancing takes place on each request then you will need to use an
alternative session mechanism. Typically the alternative is to set your own
session cookie containing an index into a session data table in a database.
Each page that requires session data extracts it from the database.

You can find more discussion of this on www.aspfaq.com or search any ASP
info site for "web farms" or "session handling"
 
D

Dave

Thanks Mark, that is what I had pretty much found out
myself, just hoping (and wishing actually) that there may
be another alternative. Unfortunately that is not the
case, but I appreciate the input either way. Thanks again,

Dave.
 

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

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top