Session lost in web Farm

R

rochagasdiniz

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
 
A

Alvin Bruney

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
 
R

rochagasdiniz

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

bruce barker \(sqlwork.com\)

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)
 
R

rochagasdiniz

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?
 
R

Rodrigo Diniz

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
 
R

Rodrigo Diniz

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top