473,408 Members | 1,676 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,408 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 1728
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.