473,395 Members | 1,742 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,395 software developers and data experts.

Network Load Balancing & Application_Start() not firing & Session clues

Our Environment:

Two network load balanced (using Microsoft NLB software) webservers
with session maintained in a SQL Server database. NLB is configured
with no affinity settings and two network cards in each machine.
Machine keys are identical on both webservers. There is no anti-virus
software installed. SQL Server database is storing session information
as specified by Microsoft guidelines.
Steps to reproduce the problem:

1. Add HttpContext.Current.Trace.Write() calls to Application_Start()
in global.asax.cs and enclose everything in try/catch blocks which log
errors to a separate database (error writing was tested in
Application_Start() separately and proven to work). Add counter to
Appliction_BeginRequest() which writes to Trace.Write the number of
requests served by the application thread (as stored in
Application["counter"])...proving that the application has restarted
and that we are viewing the inital request. Add call to Trace.Write()
to show which machine in the cluster is serving the request.
2. Edit web.config on each webserver to force them to reload the
application.
3. Access cluster address - Application_Start() is called correctly.
4. Continue to hit cluster address until our request is shifted to the
other webserver - Application_Start() does not fire.
Our Analysis:

By adding host headers specific to each webserver, we have been able to
prove that either server is able to correctly load Application_Start()
when it is the first server to serve the request. If we manually hit
each server individually, then the object will be loaded in
Application_Start() and subsequent transfers between server will occur
without error (the object is not lost from the Application[] object).

The only time we experience an error is when the request is transferred
from one server to the other and the server to which it has been
transferred needs to launch the application for the first time. When
this happens, Application_Start() does not fire and no error is
generated. The trace that would usually appear on Application_Start()
never appears and the object is never stored in Application[].
Additional Symptomology:

We have noticed some interesting session behavior in our environment.
Our current hypothesis is that it is occurring under the same
conditions as the Application_Start() problem (namely, transferring to
a server not already running our app). When a user is authenticated to
our application, we read a number of items from a configuration table
(including their stylesheet) and store them in the session object which
is held on the SqlServer. When the problem happens, the user remains
logged into the application but the stylesheet is lost. This seems to
indicate that the session is not completely lost, but the information
is not read properly out of the database. The only way to fix this is
to logout of the application and login again to create a new session.
Any help with this problem would be most appreciated. We are all
experienced programmers and explanations of InProc sessions or how to
use a database will probably not be very helpful.

Thank you in advance!

Nov 19 '05 #1
0 2085

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

Similar topics

3
by: Max | last post by:
Frankly, i need session variables to persist regardless of load balancing. My hoster says save them in files, yuk. Are there any other thoughts The problem is that the session variables are lost...
2
by: yagish | last post by:
Hi Techies, Am really new with the Oracle 9i Forms and am searching for a way to perform Load Balancing in Oracle 9i Forms Application. Its not a J2EE application, so cannot go the OC4J way. I...
1
by: Nikander Bruggeman | last post by:
I keep losing session state when I store UIPAB state in the SessionStateObject. The asp.net session state object itself stores it's state in SQL server, I'm using cookieless session state. This...
4
by: Max | last post by:
I've noticed some procedures don't run in the global.asax when you'd expect them to. I've rebuilt and set break points, but Application_Start just isn't firing today. Is there some configuration...
2
by: barak | last post by:
Hi. I noticed that when I change the timeout of the session in web.config, the event application_start in global.asax is raise, although I make no compilation. is it normal? is there a way to...
1
by: Robert | last post by:
In Web.config file is a setting for sessionState. If I want to maintain a users' session state (ie use the Session object) in a web farm that is being load balanced by a Cisco CSS 11501 Switch. ...
6
by: Andrew Robinson | last post by:
I am running two servers with a hardware network load balancing device. I know that to share session information between the two servers I need to implement some type of SQL based session...
18
by: Joey | last post by:
asp.net 2/C# I have noticed that during periods of inactivity on my website, the Application_Start event is firing about every 40-45 minutes. Is this normal? Shouldn't the app start once and...
1
by: m.a | last post by:
Hello, I am looking for a hosting solution for my asp.net application. I found that some ISP stated that session states are not preserved in a load balancing system. As I know, if the asp.net is...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.