Session in web farm

Discussion in 'ASP General' started by Danny Ni, Nov 3, 2005.

  1. Danny Ni

    Danny Ni Guest

    Hi,

    Is it possible to use session in web farm? Some say just use cookies because
    session does not work in web farm. But others say something about persist
    into SQL Sever, if this is true please tell me more about this approach.

    TIA
     
    Danny Ni, Nov 3, 2005
    #1
    1. Advertisements

  2. Danny Ni

    AlanM Guest

    I'm not sure what you mean by persist into SQL.

    but you can simply store the vales in sql, and they will persist


    "Danny Ni" <> wrote in message
    news:...
    > Hi,
    >
    > Is it possible to use session in web farm? Some say just use cookies
    > because
    > session does not work in web farm. But others say something about persist
    > into SQL Sever, if this is true please tell me more about this approach.
    >
    > TIA
    >
    >
     
    AlanM, Nov 3, 2005
    #2
    1. Advertisements

  3. Danny Ni wrote:
    > Hi,
    >
    > Is it possible to use session in web farm?


    No. Sessions will not persist if the server serving the pages changes.

    > Some say just use cookies
    > because session does not work in web farm.


    They have a point. The only drawback is if the client has cookies turned
    off, or has a firewall or anti-spyware software blocking your cookies.

    > But others say something
    > about persist into SQL Sever, if this is true please tell me more
    > about this approach.
    >

    Not much to say. You will need to have a key to identify each user. Then use
    that key to store session -related information in a database (it does not
    have to be sql server - any database will do). See
    http://www.aspfaq.com/show.asp?id=2491

    Bob Barrows
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Nov 3, 2005
    #3
    1. Advertisements

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. Steve

    Web Farm/Web Garden

    Steve, Jan 21, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    20,404
    Elliot M. Rodriguez
    Jan 21, 2004
  2. =?Utf-8?B?RGFuaWVs?=

    web farm session sharing

    =?Utf-8?B?RGFuaWVs?=, May 14, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    6,875
    Doug Perkes
    May 14, 2004
  3. =?Utf-8?B?TGVhcm5pbkd1cnU=?=

    Session TimeOut and Web Farm

    =?Utf-8?B?TGVhcm5pbkd1cnU=?=, Jun 28, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    563
    =?Utf-8?B?TGVhcm5pbkd1cnU=?=
    Jun 28, 2004
  4. David
    Replies:
    6
    Views:
    603
    Girish Bharadwaj
    Sep 14, 2004
  5. Session lost in web Farm

    , May 17, 2006, in forum: ASP .Net
    Replies:
    7
    Views:
    867
    Rodrigo Diniz
    May 18, 2006
  6. wdudek
    Replies:
    10
    Views:
    1,837
    Steven Cheng
    Mar 5, 2008
  7. Sen

    loosing Session ID in asp.net in Web Farm

    Sen, May 5, 2004, in forum: ASP .Net Security
    Replies:
    0
    Views:
    298
  8. LearninGuru

    Session Timeout and Web Farm

    LearninGuru, Jun 28, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    293
    LearninGuru
    Jun 28, 2004
Loading...