Non persistent cookie in a web farm.

Discussion in 'ASP General' started by brad, Jun 13, 2005.

  1. brad

    brad Guest

    Hi,
    Im using classic ASP (3.0) and I have a web farm with 2 webservers
    (webserver A and webserver B, both windows server 2003). I do not want
    to store any client specific information on the webserver (therefore do
    not intend to use the session object- as you cannot gaurantee which
    server the user will go to). I want to store a small value (e.g. a Y/N
    value or an Id) on the client machine for the duration of their
    browsing session, hence I want to use a non persistent cookie (in
    client memory) not a persistent cookie that will be written to disk.

    Q. Therefore if I create a non persistent cookie (i.e. it resides in
    the client browsers memory) and set this when the user was on webserver
    A, can I read the value server side on subsequent requests even if the
    user is redirected back to webserver B? As the webservers are part of
    the same domain name Im assuming I can..?

    Q. Using non persistent cookies (in client in memory) im assuming the
    session Id that gets created has no use, as I am using client side
    storage, hence it is worth disabling this on the webserver for
    performance reasons?

    Q. Is there anyway using non persistent cookies that a user can see the
    values of this cookie client side, are their any downloadable tools for
    example they can run?

    Im aware of the issues with size of using cookies and users can disable
    them, my question is more related to using them in a web farm. Im also
    not intended in the short term to upgrade to asp.net as Im aware there
    are alternatives for state storage in this. Hope someone can clarify
    these points for me. Note: I see many articles talking about cookies
    but none relating to web farms, those that do talk solely about the
    session object (Server side), none really go further to talk about (non
    persistent / persistent cookie usage with web farms client side.

    many thanks in advance.
    Brad
     
    brad, Jun 13, 2005
    #1
    1. Advertising

  2. brad

    Mark Schupp Guest

    "brad" <> wrote in message
    news:...
    > Hi,
    > Im using classic ASP (3.0) and I have a web farm with 2 webservers
    > (webserver A and webserver B, both windows server 2003). I do not want
    > to store any client specific information on the webserver (therefore do
    > not intend to use the session object- as you cannot gaurantee which
    > server the user will go to). I want to store a small value (e.g. a Y/N
    > value or an Id) on the client machine for the duration of their
    > browsing session, hence I want to use a non persistent cookie (in
    > client memory) not a persistent cookie that will be written to disk.
    >
    > Q. Therefore if I create a non persistent cookie (i.e. it resides in
    > the client browsers memory) and set this when the user was on webserver
    > A, can I read the value server side on subsequent requests even if the
    > user is redirected back to webserver B? As the webservers are part of
    > the same domain name Im assuming I can..?

    as long as the browser sees the exact same host and domain name (
    www.yoursite.com and not "server1.yoursite.com" and "server2.yoursite.com")
    then the cookie will be sent to either server. The browser will not even
    know that it is pointed at a server-farm.

    >
    > Q. Using non persistent cookies (in client in memory) im assuming the
    > session Id that gets created has no use, as I am using client side
    > storage, hence it is worth disabling this on the webserver for
    > performance reasons?

    Yes. However, if you use any code that uses the session object (like
    session.codepage) you will need to leave sessions enabled. To remove such
    code you can use the @CODEPAGE directive.

    >
    > Q. Is there anyway using non persistent cookies that a user can see the
    > values of this cookie client side, are their any downloadable tools for
    > example they can run?

    The could see the values using any utility that displays HTTP headers. I
    believe there are a number of utilities freely available for FireFox. I
    haven't seen a free one for IE but I haven't looked lately. If it is
    critical to protect the data and you cannot keep it on the server you should
    encrypt it.

    >
    > Im aware of the issues with size of using cookies and users can disable
    > them, my question is more related to using them in a web farm. Im also
    > not intended in the short term to upgrade to asp.net as Im aware there
    > are alternatives for state storage in this. Hope someone can clarify
    > these points for me. Note: I see many articles talking about cookies
    > but none relating to web farms, those that do talk solely about the
    > session object (Server side), none really go further to talk about (non
    > persistent / persistent cookie usage with web farms client side.
    >
    > many thanks in advance.
    > Brad
    >


    --
    Mark Schupp
     
    Mark Schupp, Jun 13, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marco Rispoli

    Non-persistent cookie

    Marco Rispoli, May 6, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    594
    clintonG
    May 8, 2004
  2. Kepler
    Replies:
    0
    Views:
    793
    Kepler
    Oct 27, 2004
  3. Replies:
    8
    Views:
    11,860
  4. rh.krish
    Replies:
    0
    Views:
    751
    rh.krish
    Apr 9, 2008
  5. Replies:
    0
    Views:
    256
Loading...

Share This Page