Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ASP SessionId

Reply
Thread Tools

ASP SessionId

 
 
Dave
Guest
Posts: n/a
 
      01-22-2004
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
 
Reply With Quote
 
 
 
 
Mark Schupp
Guest
Posts: n/a
 
      01-22-2004
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"

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com


"Dave" <(E-Mail Removed)> wrote in message
news:256c01c3e108$0fefaf20$(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
 
Dave
Guest
Posts: n/a
 
      01-22-2004
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.
>-----Original Message-----
>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"
>
>--
>Mark Schupp
>Head of Development
>Integrity eLearning
>www.ielearning.com
>
>
>"Dave" <(E-Mail Removed)> wrote in

message
>news:256c01c3e108$0fefaf20$(E-Mail Removed)...
>> 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

>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.Net [2.0] - SessionID Rob Meade ASP .Net 7 09-25-2008 06:38 PM
Recyling of sessionID in ASP.NET 2.0 =?Utf-8?B?SWJyYWhpbS4=?= ASP .Net 6 06-13-2006 06:11 AM
generate own unique sessionid instead standard asp.net 120bit sessionid Ronald ASP .Net 6 02-23-2004 08:03 AM
ASP.NET Duplicate SessionID Problem CQL ASP .Net 2 08-11-2003 01:50 PM
Re: Debugging -- SessionID and ASP.Net alien2_51 ASP .Net 1 07-24-2003 08:54 PM



Advertisments