Session lost in web Farm

Discussion in 'ASP .Net' started by rochagasdiniz@gmail.com, May 17, 2006.

  1. Guest

    I am having a problem configuring a state server session on a Web
    Farm.When the user records a session variable in one server and tries
    to read it on another server, I get a null reference exception.
    I already checked the path on both servers , machine key and Instance
    Id on both IIs.
    What else may be causing the problem?
    Thanks in advance
     
    , May 17, 2006
    #1
    1. Advertising

  2. Alvin Bruney Guest

    Can you read anything at all from the session? I assume that you have your
    exact machine keys copied to EACH server in the farm right?

    --

    ________________________
    Warm regards,
    Alvin Bruney [MVP ASP.NET]

    [Shameless Author plug]
    Professional VSTO.NET - Wrox/Wiley
    The O.W.C. Black Book with .NET
    www.lulu.com/owc, Amazon
    Blog: http://www.msmvps.com/blogs/alvin
    -------------------------------------------------------

    <> wrote in message
    news:...
    >I am having a problem configuring a state server session on a Web
    > Farm.When the user records a session variable in one server and tries
    > to read it on another server, I get a null reference exception.
    > I already checked the path on both servers , machine key and Instance
    > Id on both IIs.
    > What else may be causing the problem?
    > Thanks in advance
    >
     
    Alvin Bruney, May 17, 2006
    #2
    1. Advertising

  3. Guest

    I am using only two servers and I checked the machinekey several times
    and the values are the same.
    If the request comes twice to the same ip , the session is there, but
    when it goes to the second ip ,the session is not there.I built a test
    page where I just record a string in the session and try to retrieve
    it.
    The error appears when the page to retreive the session varaible goes
    two a different ip than the page that recorded the variable.
     
    , May 17, 2006
    #3
  4. couple things to check

    1) the web servers are all using the same sessionstate server
    2) there are no redirects to ipaddress
    3) that the web are all using the same domainname in the session cookie.

    -- bruce (sqlwork.com)


    <> wrote in message
    news:...
    >I am having a problem configuring a state server session on a Web
    > Farm.When the user records a session variable in one server and tries
    > to read it on another server, I get a null reference exception.
    > I already checked the path on both servers , machine key and Instance
    > Id on both IIs.
    > What else may be causing the problem?
    > Thanks in advance
    >
     
    bruce barker \(sqlwork.com\), May 17, 2006
    #4
  5. Guest

    The only thing different in two servers is one key in the
    machine.config.
    The user that connects to the asp.net is the same , but in one machine
    the password
    is autogenerated and in the other the password is hardcoded.
    The stateserver configuration is the same. Earlier today I saw that the
    instance ids on the iis where different and corrected this, restarted
    both iis and state server service.
    Do I need to reboot the machines?
     
    , May 17, 2006
    #5
  6. Alvin Bruney Guest

    The machine keys need to be the same. Read http://aspalliance.com/383

    --

    ________________________
    Warm regards,
    Alvin Bruney [MVP ASP.NET]

    [Shameless Author plug]
    Professional VSTO.NET - Wrox/Wiley
    The O.W.C. Black Book with .NET
    www.lulu.com/owc, Amazon
    Blog: http://www.msmvps.com/blogs/alvin
    -------------------------------------------------------

    <> wrote in message
    news:...
    > The only thing different in two servers is one key in the
    > machine.config.
    > The user that connects to the asp.net is the same , but in one machine
    > the password
    > is autogenerated and in the other the password is hardcoded.
    > The stateserver configuration is the same. Earlier today I saw that the
    > instance ids on the iis where different and corrected this, restarted
    > both iis and state server service.
    > Do I need to reboot the machines?
    >
     
    Alvin Bruney, May 18, 2006
    #6
  7. The machine keys are the same, the instance id of the sites are the
    same.The state server is the same... I am running out of options
     
    Rodrigo Diniz, May 18, 2006
    #7
  8. Solved the problem !!!
    This article has the solution (in part)!!!
    http://support.microsoft.com/default.aspx?scid=kb;en-us;325056
    the part of the article says you shou check for the instance id of the
    websites
    "\LM\W3SVC\2" , but it does not say that after the number it has a
    string "root"
    It happens that in one of my servers this string was all in uppercase
    and in the other it was all in lower case ... I changed his and voulá
    ...the session works..
    thanks for all that tried to help.
     
    Rodrigo Diniz, May 18, 2006
    #8
    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. Robby van Damme
    Replies:
    0
    Views:
    1,325
    Robby van Damme
    Aug 8, 2003
  2. =?Utf-8?B?RGFuaWVs?=

    web farm session sharing

    =?Utf-8?B?RGFuaWVs?=, May 14, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    6,690
    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:
    490
    =?Utf-8?B?TGVhcm5pbkd1cnU=?=
    Jun 28, 2004
  4. David
    Replies:
    6
    Views:
    459
    Girish Bharadwaj
    Sep 14, 2004
  5. wdudek
    Replies:
    10
    Views:
    1,608
    Steven Cheng
    Mar 5, 2008
Loading...

Share This Page