Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Session lost in web Farm

Reply
Thread Tools

Session lost in web Farm

 
 
rochagasdiniz@gmail.com
Guest
Posts: n/a
 
      05-17-2006
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

 
Reply With Quote
 
 
 
 
Alvin Bruney
Guest
Posts: n/a
 
      05-17-2006
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: oups.com...
>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
>



 
Reply With Quote
 
 
 
 
rochagasdiniz@gmail.com
Guest
Posts: n/a
 
      05-17-2006
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.

 
Reply With Quote
 
bruce barker \(sqlwork.com\)
Guest
Posts: n/a
 
      05-17-2006
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: oups.com...
>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
>



 
Reply With Quote
 
rochagasdiniz@gmail.com
Guest
Posts: n/a
 
      05-17-2006
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?

 
Reply With Quote
 
Alvin Bruney
Guest
Posts: n/a
 
      05-18-2006
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: oups.com...
> 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?
>



 
Reply With Quote
 
Rodrigo Diniz
Guest
Posts: n/a
 
      05-18-2006
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

 
Reply With Quote
 
Rodrigo Diniz
Guest
Posts: n/a
 
      05-18-2006
Solved the problem !!!
This article has the solution (in part)!!!
http://support.microsoft.com/default...b;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.

 
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
Session management on web farm with sql server wdudek ASP .Net 10 03-05-2008 01:21 AM
urgent: configurating web farm to share Session David ASP .Net 6 09-14-2004 08:54 PM
Session TimeOut and Web Farm =?Utf-8?B?TGVhcm5pbkd1cnU=?= ASP .Net 0 06-28-2004 10:06 AM
web farm session sharing =?Utf-8?B?RGFuaWVs?= ASP .Net 4 05-14-2004 06:20 PM
Re: asp.net session state in web farm does not work with stateserver Robby van Damme ASP .Net 0 08-08-2003 07:37 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57