473,807 Members | 2,820 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

getting 'Object reference not set to an instance' some times

Hello,

I am getting this error once in a while from my web
sites. When I will refresh web browser, it goes off and
sites are working fine.

Directory structures and file names are as below-

C:\WWW - corporate site, C:\WWW\default. aspx is the
default page and this site works fine.
C:\Content\www is a virtual directory(/content) on the
site from where all ASPX files (other than default.aspx)
are referenced. All other files in \WWW are ASP pages. So
\WWW has a \bin directory, which has all ASPX Dlls.

C:\Content\div1 .aspx
C:\Content\div2 .aspx
C:\Content\div3 .aspx
C:\Content\div4 .aspx
........ are our divisional site home pages [with
different divisional site IPs]. \content is also a virtul
directory (\content\www) for all divisional sites, so we
have bin directory copied in \content and \content\www as
well.

Error description-
[NullReferenceEx ception: Object reference not set to an
instance of an object.]
Admin.Global.Ap plication_Start (Object sender,
EventArgs e) +347

Anybody has any idea of what is happening?

Thanks in advance - Binoy
Nov 18 '05 #1
6 1711
I would start by looking at "Admin.Global.A pplication_Star t(Object sender,
EventArgs e)" - Line 347

Could you post that?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Binoy" <an*******@disc ussions.microso ft.com> wrote in message
news:a0******** *************** *****@phx.gbl.. .
Hello,

I am getting this error once in a while from my web
sites. When I will refresh web browser, it goes off and
sites are working fine.

Directory structures and file names are as below-

C:\WWW - corporate site, C:\WWW\default. aspx is the
default page and this site works fine.
C:\Content\www is a virtual directory(/content) on the
site from where all ASPX files (other than default.aspx)
are referenced. All other files in \WWW are ASP pages. So
\WWW has a \bin directory, which has all ASPX Dlls.

C:\Content\div1 .aspx
C:\Content\div2 .aspx
C:\Content\div3 .aspx
C:\Content\div4 .aspx
....... are our divisional site home pages [with
different divisional site IPs]. \content is also a virtul
directory (\content\www) for all divisional sites, so we
have bin directory copied in \content and \content\www as
well.

Error description-
[NullReferenceEx ception: Object reference not set to an
instance of an object.]
Admin.Global.Ap plication_Start (Object sender,
EventArgs e) +347

Anybody has any idea of what is happening?

Thanks in advance - Binoy

Nov 18 '05 #2
Kevin,

Really Global.asax.vb has only 142 lines.

Thanks
-Binoy
-----Original Message-----
I would start by looking at "Admin.Global.A pplication_Star t(Object sender,EventArgs e)" - Line 347

Could you post that?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Binoy" <an*******@disc ussions.microso ft.com> wrote in messagenews:a0******* *************** ******@phx.gbl. ..
Hello,

I am getting this error once in a while from my web
sites. When I will refresh web browser, it goes off and
sites are working fine.

Directory structures and file names are as below-

C:\WWW - corporate site, C:\WWW\default. aspx is the
default page and this site works fine.
C:\Content\www is a virtual directory(/content) on the
site from where all ASPX files (other than default.aspx) are referenced. All other files in \WWW are ASP pages. So \WWW has a \bin directory, which has all ASPX Dlls.

C:\Content\div1 .aspx
C:\Content\div2 .aspx
C:\Content\div3 .aspx
C:\Content\div4 .aspx
....... are our divisional site home pages [with
different divisional site IPs]. \content is also a virtul directory (\content\www) for all divisional sites, so we have bin directory copied in \content and \content\www as well.

Error description-
[NullReferenceEx ception: Object reference not set to an
instance of an object.]
Admin.Global.Ap plication_Start (Object sender,
EventArgs e) +347

Anybody has any idea of what is happening?

Thanks in advance - Binoy

.

Nov 18 '05 #3
Well, the number of lines in your Application+Sta rt method should be even
smaller. What development environment are you using?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"bINOY" <an*******@disc ussions.microso ft.com> wrote in message
news:a1******** *************** *****@phx.gbl.. .
Kevin,

Really Global.asax.vb has only 142 lines.

Thanks
-Binoy
-----Original Message-----
I would start by looking

at "Admin.Global.A pplication_Star t(Object sender,
EventArgs e)" - Line 347

Could you post that?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Binoy" <an*******@disc ussions.microso ft.com> wrote in

message
news:a0******* *************** ******@phx.gbl. ..
Hello,

I am getting this error once in a while from my web
sites. When I will refresh web browser, it goes off and
sites are working fine.

Directory structures and file names are as below-

C:\WWW - corporate site, C:\WWW\default. aspx is the
default page and this site works fine.
C:\Content\www is a virtual directory(/content) on the
site from where all ASPX files (other than default.aspx) are referenced. All other files in \WWW are ASP pages. So \WWW has a \bin directory, which has all ASPX Dlls.

C:\Content\div1 .aspx
C:\Content\div2 .aspx
C:\Content\div3 .aspx
C:\Content\div4 .aspx
....... are our divisional site home pages [with
different divisional site IPs]. \content is also a virtul directory (\content\www) for all divisional sites, so we have bin directory copied in \content and \content\www as well.

Error description-
[NullReferenceEx ception: Object reference not set to an
instance of an object.]
Admin.Global.Ap plication_Start (Object sender,
EventArgs e) +347

Anybody has any idea of what is happening?

Thanks in advance - Binoy

.

Nov 18 '05 #4
Kevin,

We are working on Visual Studio .NET 2003 / Framework 1.1
on Windows XP desktops.

Server is Windows 2000 server with Framework 1.1.

I searched Google and came across with only questions -
No answers.

Thanks
-Binoy
-----Original Message-----
Well, the number of lines in your Application+Sta rt method should be evensmaller. What development environment are you using?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"bINOY" <an*******@disc ussions.microso ft.com> wrote in messagenews:a1******* *************** ******@phx.gbl. ..
Kevin,

Really Global.asax.vb has only 142 lines.

Thanks
-Binoy
>-----Original Message-----
>I would start by looking

at "Admin.Global.A pplication_Star t(Object sender,
>EventArgs e)" - Line 347
>
>Could you post that?
>
>--
>HTH,
>Kevin Spencer
>..Net Developer
>Microsoft MVP
>Big things are made up
>of lots of little things.
>
>"Binoy" <an*******@disc ussions.microso ft.com> wrote in

message
>news:a0******* *************** ******@phx.gbl. ..
>> Hello,
>>
>> I am getting this error once in a while from my web
>> sites. When I will refresh web browser, it goes off and >> sites are working fine.
>>
>> Directory structures and file names are as below-
>>
>> C:\WWW - corporate site, C:\WWW\default. aspx is the
>> default page and this site works fine.
>> C:\Content\www is a virtual directory(/content) on the >> site from where all ASPX files (other than

default.aspx)
>> are referenced. All other files in \WWW are ASP pages.
So
>> \WWW has a \bin directory, which has all ASPX Dlls.
>>
>> C:\Content\div1 .aspx
>> C:\Content\div2 .aspx
>> C:\Content\div3 .aspx
>> C:\Content\div4 .aspx
>> ....... are our divisional site home pages [with
>> different divisional site IPs]. \content is also a

virtul
>> directory (\content\www) for all divisional sites,
so we
>> have bin directory copied in \content and
\content\www as
>> well.
>>
>> Error description-
>> [NullReferenceEx ception: Object reference not set

to an >> instance of an object.]
>> Admin.Global.Ap plication_Start (Object sender,
>> EventArgs e) +347
>>
>> Anybody has any idea of what is happening?
>>
>> Thanks in advance - Binoy
>
>
>.
>

.

Nov 18 '05 #5
Hi Binoy,

I can tell you a couple of things for certain. The error is occurring in
your Application_Sta rt Event handler. The resson refreshing the browser
makes the error go away is that the Application_Sta rt method only fires when
the Application starts, which would happen rarely, and certainly NOT after a
page is refreshed. So, the intermittent part is that the Application_Sta rt
method is only fired intermittently.

The error message indicates that there is a reference to an object in that
method, an object which has not been instantiated in any way. If you post
your Application_Sta rt code I can take a wild guess as to the line that
threw the exception.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Binoy" <an*******@disc ussions.microso ft.com> wrote in message
news:b6******** *************** *****@phx.gbl.. .
Kevin,

We are working on Visual Studio .NET 2003 / Framework 1.1
on Windows XP desktops.

Server is Windows 2000 server with Framework 1.1.

I searched Google and came across with only questions -
No answers.

Thanks
-Binoy
-----Original Message-----
Well, the number of lines in your Application+Sta rt

method should be even
smaller. What development environment are you using?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"bINOY" <an*******@disc ussions.microso ft.com> wrote in

message
news:a1******* *************** ******@phx.gbl. ..
Kevin,

Really Global.asax.vb has only 142 lines.

Thanks
-Binoy

>-----Original Message-----
>I would start by looking
at "Admin.Global.A pplication_Star t(Object sender,
>EventArgs e)" - Line 347
>
>Could you post that?
>
>--
>HTH,
>Kevin Spencer
>..Net Developer
>Microsoft MVP
>Big things are made up
>of lots of little things.
>
>"Binoy" <an*******@disc ussions.microso ft.com> wrote in
message
>news:a0******* *************** ******@phx.gbl. ..
>> Hello,
>>
>> I am getting this error once in a while from my web
>> sites. When I will refresh web browser, it goes off and >> sites are working fine.
>>
>> Directory structures and file names are as below-
>>
>> C:\WWW - corporate site, C:\WWW\default. aspx is the
>> default page and this site works fine.
>> C:\Content\www is a virtual directory(/content) on the >> site from where all ASPX files (other than
default.aspx)
>> are referenced. All other files in \WWW are ASP pages. So
>> \WWW has a \bin directory, which has all ASPX Dlls.
>>
>> C:\Content\div1 .aspx
>> C:\Content\div2 .aspx
>> C:\Content\div3 .aspx
>> C:\Content\div4 .aspx
>> ....... are our divisional site home pages [with
>> different divisional site IPs]. \content is also a
virtul
>> directory (\content\www) for all divisional sites, so we
>> have bin directory copied in \content and \content\www as
>> well.
>>
>> Error description-
>> [NullReferenceEx ception: Object reference not set to an >> instance of an object.]
>> Admin.Global.Ap plication_Start (Object sender,
>> EventArgs e) +347
>>
>> Anybody has any idea of what is happening?
>>
>> Thanks in advance - Binoy
>
>
>.
>

.

Nov 18 '05 #6
Kevin,

Here's my App Start -

Sub Application_Sta rt(ByVal sender As Object,
ByVal e As EventArgs)
' Fires when the application is
started,Assign the application variables from the
web.config file
Application("In valid_Permissio ns_Page") =
ConfigurationSe ttings.AppSetti ngs.Item
("Invalid_Permi ssions_Page").T oString()
Application("As px_Error_File") =
ConfigurationSe ttings.AppSetti ngs.Item
("Aspx_Error_Fi le").ToString ()
Application("Im ages_Virtual_Pa th") =
ConfigurationSe ttings.AppSetti ngs.Item
("Images_Virtua l_Path").ToStri ng()
Application("st rAspxDefaultFil e") =
ConfigurationSe ttings.AppSetti ngs.Item
("Aspx_Default_ File").ToString ()
Application("DD _Menu_XML_CSS_F ile_Path") =
ConfigurationSe ttings.AppSetti ngs.Item
("DD_Menu_XML_C SS_File_Path"). ToString()
Application("DD MenuImagePath") =
ConfigurationSe ttings.AppSetti ngs.Item
("DD_Menu_Image _Path").ToStrin g()

Dim objblTopSection As New
myrootnamespace .Templates.blTe mplateImageSect ion
Dim dtSupTopControl As DataTable
Dim intSupplierId As Integer
intSupplierId =
myrootnamespace .Utility_Manage r.CommonFunctio ns.GetSupplie
rID(HttpContext .Current.Reques t.Url.GetLeftPa rt
(Uri_Partial.Au thority))
dtSupTopControl =
objblTopSection .RetreiveCustom SupplierTop(int SupplierId)

Application("Cu stomizeTopNav") =
dtSupTopControl .Rows(0).Item(" Customize")
If Not dtSupTopControl .Rows(0).IsNull
("CustomPageSiz e") Then
Application("Cu stomPageSize") =
dtSupTopControl .Rows(0).Item(" CustomPageSize" )
Else
Application("Cu stomPageSize") = 800
End If
End Sub

Please let me know if you have any questions.

Thanks
-Binoy
-----Original Message-----
Hi Binoy,

I can tell you a couple of things for certain. The error is occurring inyour Application_Sta rt Event handler. The resson refreshing the browsermakes the error go away is that the Application_Sta rt method only fires whenthe Application starts, which would happen rarely, and certainly NOT after apage is refreshed. So, the intermittent part is that the Application_Sta rtmethod is only fired intermittently.

The error message indicates that there is a reference to an object in thatmethod, an object which has not been instantiated in any way. If you postyour Application_Sta rt code I can take a wild guess as to the line thatthrew the exception.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Binoy" <an*******@disc ussions.microso ft.com> wrote in messagenews:b6******* *************** ******@phx.gbl. ..
Kevin,

We are working on Visual Studio .NET 2003 / Framework 1.1 on Windows XP desktops.

Server is Windows 2000 server with Framework 1.1.

I searched Google and came across with only questions -
No answers.

Thanks
-Binoy
>-----Original Message-----
>Well, the number of lines in your Application+Sta rt

method should be even
>smaller. What development environment are you using?
>
>--
>HTH,
>Kevin Spencer
>..Net Developer
>Microsoft MVP
>Big things are made up
>of lots of little things.
>
>"bINOY" <an*******@disc ussions.microso ft.com> wrote in

message
>news:a1******* *************** ******@phx.gbl. ..
>> Kevin,
>>
>> Really Global.asax.vb has only 142 lines.
>>
>> Thanks
>> -Binoy
>>
>> >-----Original Message-----
>> >I would start by looking
>> at "Admin.Global.A pplication_Star t(Object sender,
>> >EventArgs e)" - Line 347
>> >
>> >Could you post that?
>> >
>> >--
>> >HTH,
>> >Kevin Spencer
>> >..Net Developer
>> >Microsoft MVP
>> >Big things are made up
>> >of lots of little things.
>> >
>> >"Binoy" <an*******@disc ussions.microso ft.com> wrote in >> message
>> >news:a0******* *************** ******@phx.gbl. ..
>> >> Hello,
>> >>
>> >> I am getting this error once in a while from my web >> >> sites. When I will refresh web browser, it goes off
and
>> >> sites are working fine.
>> >>
>> >> Directory structures and file names are as below-
>> >>
>> >> C:\WWW - corporate site, C:\WWW\default. aspx is
the >> >> default page and this site works fine.
>> >> C:\Content\www is a virtual directory(/content) on the
>> >> site from where all ASPX files (other than
>> default.aspx)
>> >> are referenced. All other files in \WWW are ASP

pages.
>> So
>> >> \WWW has a \bin directory, which has all ASPX
Dlls. >> >>
>> >> C:\Content\div1 .aspx
>> >> C:\Content\div2 .aspx
>> >> C:\Content\div3 .aspx
>> >> C:\Content\div4 .aspx
>> >> ....... are our divisional site home pages [with
>> >> different divisional site IPs]. \content is also a >> virtul
>> >> directory (\content\www) for all divisional

sites, so
>> we
>> >> have bin directory copied in \content and

\content\www
>> as
>> >> well.
>> >>
>> >> Error description-
>> >> [NullReferenceEx ception: Object reference not set

to an
>> >> instance of an object.]
>> >> Admin.Global.Ap plication_Start (Object sender,
>> >> EventArgs e) +347
>> >>
>> >> Anybody has any idea of what is happening?
>> >>
>> >> Thanks in advance - Binoy
>> >
>> >
>> >.
>> >
>
>
>.
>

.

Nov 18 '05 #7

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

Similar topics

303
17808
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b. Yahoo store was originally written in Lisp. c. Emacs The issues with these will probably come up, so I might as well mention them myself (which will also make this a more balanced
9
1606
by: Jimmy Cerra | last post by:
I am a little confused how the memory for objects is allocated in JavaScript. David Flanagan, in "JavaScript: The Definitive Guide," states that each property of a class takes up memory space when instantiated. So space is created for aMethod three times in this example: // Example 1 function aMethod() {/*stuff*/}; function AClass() { /*stuff*/
6
22541
by: Martin | last post by:
I'd like to be able to get the name of an object instance from within a call to a method of that same object. Is this at all possible? The example below works by passing in the name of the object instance (in this case 'myDog'). Of course it would be better if I could somehow know from within write() that the name of the object instance was 'myDog' without having to pass it as a parameter. //////////////////////////////// function...
16
25424
by: sneill | last post by:
How is it possible to take the value of a variable (in this case, MODE_CREATE, MODE_UPDATE, etc) and use that as an object property name? In the following example I want 'oIcon' object to have the properties: mode1, mode2, and mode3. This seems simple but I can't quite figure it out... Any ideas anyone?
8
2118
by: Dennis Myrén | last post by:
I have these tiny classes, implementing an interface through which their method Render ( CosWriter writer ) ; is called. Given a specific context, there are potentially a lot of such objects, each requiring a call to that method to fulfill their purpose. There could be 200, there could be more than 1000. That is a lot of references passed around. It feels heavy. Let us say i changed the signature of the interface method to:
1
906
by: D Pahadsing | last post by:
i'm using asp.net 1.1 & ms access. the ms-access database is placed in a separate folder with permissions set as belo Administrator : full contro ASPNET : full contro user1 : full contro & set to open in shared mode, no record locking the file is also shared for user1 to insert/update the database through a desktop Access Application I get the data & display it in the aspx page (no updating/inserting is done through the asp.net appln.)...
6
6128
by: blash | last post by:
Can someone help me? I really don't have a clue. My company staff told me they often got such error: "Object reference not set to an instance of an object." when they are in search result page then tried to access 2nd, or 3rd, etc page. The problem is it happens sometimes - sometimes when they clicked refresh button, then everything is ok. Now they told me it happens more frequently. but I have tried by myself many times and never got...
12
5560
by: Andrew Poulos | last post by:
With the following code I can't understand why this.num keeps incrementing each time I create a new instance of Foo. For each instance I'm expecting this.num to alert as 1 but keeps incrementing. Foo = function(type) { this.num = 0; this.type = type this.trigger(); } Foo.prototype.trigger = function() {
4
2181
by: My Pet Programmer | last post by:
Ok guys, I'm really looking for someone to tell me how bad a hack this is, and if I'm close to where I should be with it. The basic situation is that I have a class which creates a basic calendar control, the only difference is I stole the navigation scheme from Vista (e.g., if you click on the year you zoom out to the months list, then out to the decade, and back in when you click a year, then a month). I ran into some trouble...
0
9720
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10626
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...
1
10374
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10112
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
9193
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
6879
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
5546
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...
0
5685
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4330
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

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.