How to move a session from one webserver to anothe

Results 1 to 3 of 3

Thread: How to move a session from one webserver to anothe

  1. #1
    Hannes Heckner Guest

    Default How to move a session from one webserver to anothe

    I have a nonsecure webserver with a shopping-cart based on a session.<BR>Like this:<BR>Sub Session_OnStart<BR> ReDim TheCart(TotalItems, Attributes)<BR> Session("Cart") = TheCart<BR> Session("MaximumItems") = 5<BR> Session("ItemCount") = 0<BR>End Sub<BR><BR>After the customer has filled his cart he wants to check out. Therefore we link him to a secure webserver. But then the session is gone (as the cookie is only valid for the nonsecure webserver).<BR>How can I resolve this problem? Move all cart-related pages to the secure server? Is there a way to move a session? I tried to write a new cookie containing the cart information (didn&#039t work because of illegal variable type).<BR><BR>Thanks for any advice<BR>Hannes

  2. #2
    Chris Willey Guest

    Default RE: How to move a session from one webserver to an

    Pass the three session variables in the query string to a page on the secure server that re-establishes the session variables on the secure server. That&#039s probably the easiest way.

  3. #3
    Join Date
    Dec 1969
    Posts
    699

    Default RE: How to move a session from one webserver to an

    We had a similar problem using web farms on high volume web sites. We used sessions for many things, but we had no way of controlling which server (out of 7) the user would end up using.<BR><BR>I wrote a client/server app that created a session on all the servers, and kept all the variables in synch with every http hit.<BR><BR>Another easy way to mock this is to put the user in a frameset. The main frame would be the non-secure area. A very small tiny portion of the other frame would be secure. Create a session on both the frames. Using some intuitive asp code and frame targeting, you can keep all the session variables in synch.<BR><BR>I would stay away from putting shopping cart stuff in a cookie.. they are very easy to hack, and that shopping cart can become pretty large pretty quickly! Nothing worst than huge cookies :)<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •