473,287 Members | 1,927 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Session lost in web Farm

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 '06 #1
7 1725
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
-------------------------------------------------------

<ro***********@gmail.com> wrote in message
news:11**********************@y43g2000cwc.googlegr 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

May 17 '06 #2
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 '06 #3
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)
<ro***********@gmail.com> wrote in message
news:11**********************@y43g2000cwc.googlegr 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

May 17 '06 #4
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 '06 #5
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
-------------------------------------------------------

<ro***********@gmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr 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?

May 18 '06 #6
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

May 18 '06 #7
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.

May 18 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Billy Jacobs | last post by:
I am having a problem with my session variable being set to Null for no apparent reason. I am declaring it like the following when the user logs in. dim objUserInfo as new clsUserInfo 'Set...
0
by: CJ | last post by:
Hi We have Session Data lost randomly and Session State expired early. Our Intranet Application uses Window Server 2003 and .Net Framework 1.1. We set Session Time out to 60 minutes. but user...
3
by: Mark | last post by:
Ok, I know that .net inherently does not share session data across asp.net projects, but is there any decent work around to this. We already have a big chunk of our application using the asp.net...
9
by: Patrick | last post by:
Hello I'm running two Webservers Using ASP.NET. both are running the same ASP.NET Application, with <sessionState mode="SQLServer" stateConnectionString="tcpip=127.0.0.1:42424"...
5
by: fbwhite | last post by:
I know this issue has been brought up many times, but I have tried many of the solutions to no avail. I wanted to give my specific case to see if someone could be of any help. We are using the...
10
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much...
4
by: Sarah Marriott | last post by:
Our website contains session variables that are used to validate if a user is logged in etc. We have found that these variables are randomly lost while navigating the website. We set up some...
5
by: knyghtfyre | last post by:
Hello, My company is developing a rather large application with .NET 2.0. We are expanding to a server farm and are in the process of converting our application to use an out-of-process session...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.