473,659 Members | 3,162 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1733
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.goo glegroups.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.goo glegroups.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.goo glegroups.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
7204
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 some properties objUserInfo.UserName = txtUserName.text.trim objUserInfo...
0
2087
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 Session Data lost randomly and Session State sometime expired early. I pretty run out the solution to fix this problem. Althoug we use Web Farm but we have Sticky IP to let user request go to the same server all the time. We turn off the Web...
3
3441
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 session object (using state service). I'd like to start breaking out our functionality into component projects, but I'd like to get this session issue worked out first. Any ideas?? I found this article , but it sounds like kind of a pain.
9
2093
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" sqlConnectionString="data source=myserver;user id=myuser;password=mypw" cookieless="false" timeout="20" /> This seems to work. But we have cases, when users report that they loose the
5
5276
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 sessionstate inproc mode and users are randomly losing their session. I do not believe it is happening across all users at one time. It seems to happen to different users at different times, but I am only going off heresay. The aspnet worker...
10
3500
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 more time I have on a session? If I do a refresh, does reset the session clock? Do you have have to go to another page to reset the session timeout or will a postback also do it? This is important as we have a few pages that a user
4
2864
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 basic code (as shown below) which used a meta tag to refresh an aspx page every second. It tests whether there is any content in a session variable, if not then it writes a timestamp to a text file, recreates the data in the variable and continues....
5
2630
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 state management with SQL Server. We have ran into a problem with the Session_onEnd event. We know it's not supposed to fire when in an out-of-process mode, but we have a large amount of code that must be executed to clean the session and to
0
8337
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8748
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8628
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7359
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5650
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2754
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.