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

incosistent error on windows 2003 server machines

Hello All,

Okay....here goes.We are currently in the process of updating our
servers to windows 2003 server from Windows 2k. Before making any
changes to our production environment, we ran the new servers on our
test environments to make sure that we had everything configured
correctly. We had no problems in the test environments, and moved the
servers into production earlier this week. That is when the s**t hit
the fan.

we have been receiving an inconsistent, but frequent object reference
error coming from our page template. particularly, the method that
attaches our session id to the url (we have custom session management
using sqlserver because we use multiple servers that share session). In
this method, we loop through all of the controls on the page, and if we
find a hyperlink on the page, we append the session id to the end of
the url. my reason for stating all of this is that im not sure if the
problem is with our session management, or if its occuring in the
process of looping through the controls. due to the fact that it is
nearly impossible to predict when this error will occur (all we know is
that it occurs alot), and the message and stacktrace provide little to
no help, we dont really know which direction to take in trying to fix
the problem. additionally, this was not occuring on the test
environments (we're thinking because the load was much less than
production).

what could be causing this problem?? here is the error message:

************************************************** **********************

object reference not set to an instance of an object.

stack trace:

[NullReferenceException: Object reference not set to an instance of an
object.]
Components.Controls.PageTemplate.BaseTemplate.AdSe ssionIdToHyperLinks(ControlCollection
ActiveControl) + 239
Components.Controls.PageTemplate.BaseTemplate.AdSe ssionIdToHyperLinks(ControlCollection
ActiveControl) + 307
Components.Controls.PageTemplate.BaseTemplate.Appl yPageCustomizations()
+22
Components.Controls.PageTemplate.BaseTemplate.Page _Load(object sender,
EventArgs e) + 35
System.EventHandler.Invoke(object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e)+67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750

************************************************** **********************

At this point, any input or suggestions would be greatly appreciated.
if we can at least determine wher the problem lays, researching
solutions will be much easier.

Thanks!

Jimi

May 25 '06 #1
1 1396
here is the method that its blowing up on:

public void AddSessionIdToHyperLinks(System.Web.UI.ControlColl ection
ActiveControls)
{
HyperLink Link;
Control TempControl;

for(int x=0;x<ActiveControls.Count;x++)
{
TempControl = ActiveControls[x];
Link = new HyperLink();
if(TempControl is HyperLink)
{
Link = TempControl as HyperLink;
//Find out if session id already exists within the URL.
//If it does, lets not add it again.
int SessionPosition=Link.NavigateUrl.IndexOf("di=" + SessionId,0);
if (SessionPosition < 0)
{
int QMPosition = Link.NavigateUrl.IndexOf("?",0);
string UrlDelemeter;
//Determine what delimeter needs to be
//added before the session id
if(QMPosition > 0)
{
UrlDelemeter = "&";
}
else
{
UrlDelemeter = "?";
}
Link.NavigateUrl = Link.NavigateUrl + UrlDelemeter + "di=" +
SessionId;
}
}
if(TempControl.HasControls())
{
AddSessionIdToHyperLinks(TempControl.Controls);
}
}
}

May 25 '06 #2

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

Similar topics

5
by: Ken Cox [Microsoft MVP] | last post by:
MS has posted this here: http://www.asp.net/faq/ms03-32-issue.aspx Fix for: 'Server Application Unavailable' Error after Applying Security Update for IE...
6
by: AlanS | last post by:
I have used Visual Studio for about 8 months. I have developed some ASP solutions. I had to get on with some other things and have not worked with ASP.NET for a couple months. In the meantime, I...
6
by: Damien Sawyer | last post by:
Hello - I'm having a serious problem with IIS on Windows XP pro. Whenever I try to run ASP pages, I get HTTP 500 - Internal server error This behaviour happens identically, on two 'totally...
10
by: Shawn | last post by:
JIT Debugging failed with the following error: Access is denied. JIT Debugging was initiated by the following account 'PLISKEN\ASPNET' I get this messag in a dialog window when I try to open an...
7
by: Martin Strojek | last post by:
Hi, I have the following problem with developing some web site. I use Visual Studio 2003 to build a website. I tried Windows 2003 Server and switched now back to Windows XP with PWS but the...
6
by: Raul Rodriguez | last post by:
I posted this question already but nobody could answer me. Please forgive for doing it again, but it's very important for my company. We have been searching for this error with different engines...
10
by: deathtospam | last post by:
My employer is starting to take the first steps towards migrating its Classic ASP codebase to ASP.NET v2.0. We have a copy of our existing website on the new Windows Server 2003 R2 test server,...
0
by: JeremyPollack | last post by:
Here's the situation : I have the same ASP.NET 2.0 web application running on both Machine A and Machine B. On both machines, I have Integrated Windows Authentication turned on, and Anonymous...
1
by: icecroft | last post by:
Hello everyone! We're running a windows service application and it gets this error: "the service did not respond to the start or control request in a timely fashion". It works in most machines...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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
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,...

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.