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

B

Binoy

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-
[NullReferenceException: Object reference not set to an
instance of an object.]
Admin.Global.Application_Start(Object sender,
EventArgs e) +347

Anybody has any idea of what is happening?

Thanks in advance - Binoy
 
K

Kevin Spencer

I would start by looking at "Admin.Global.Application_Start(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.
 
B

bINOY

Kevin,

Really Global.asax.vb has only 142 lines.

Thanks
-Binoy
-----Original Message-----
I would start by looking
at "Admin.Global.Application_Start(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.

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-
[NullReferenceException: Object reference not set to an
instance of an object.]
Admin.Global.Application_Start(Object sender,
EventArgs e) +347

Anybody has any idea of what is happening?

Thanks in advance - Binoy


.
 
K

Kevin Spencer

Well, the number of lines in your Application+Start 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 said:
Kevin,

Really Global.asax.vb has only 142 lines.

Thanks
-Binoy
-----Original Message-----
I would start by looking
at "Admin.Global.Application_Start(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.

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-
[NullReferenceException: Object reference not set to an
instance of an object.]
Admin.Global.Application_Start(Object sender,
EventArgs e) +347

Anybody has any idea of what is happening?

Thanks in advance - Binoy


.
 
B

Binoy

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+Start 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.

Kevin,

Really Global.asax.vb has only 142 lines.

Thanks
-Binoy
-----Original Message-----
I would start by looking
at "Admin.Global.Application_Start(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.

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-
[NullReferenceException: Object reference not set to an
instance of an object.]
Admin.Global.Application_Start(Object sender,
EventArgs e) +347

Anybody has any idea of what is happening?

Thanks in advance - Binoy


.


.
 
K

Kevin Spencer

Hi Binoy,

I can tell you a couple of things for certain. The error is occurring in
your Application_Start Event handler. The resson refreshing the browser
makes the error go away is that the Application_Start 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_Start
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_Start 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 said:
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+Start 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.

Kevin,

Really Global.asax.vb has only 142 lines.

Thanks
-Binoy

-----Original Message-----
I would start by looking
at "Admin.Global.Application_Start(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.

message
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-
[NullReferenceException: Object reference not set to an
instance of an object.]
Admin.Global.Application_Start(Object sender,
EventArgs e) +347

Anybody has any idea of what is happening?

Thanks in advance - Binoy


.


.
 
B

Binoy

Kevin,

Here's my App Start -

Sub Application_Start(ByVal sender As Object,
ByVal e As EventArgs)
' Fires when the application is
started,Assign the application variables from the
web.config file
Application("Invalid_Permissions_Page") =
ConfigurationSettings.AppSettings.Item
("Invalid_Permissions_Page").ToString()
Application("Aspx_Error_File") =
ConfigurationSettings.AppSettings.Item
("Aspx_Error_File").ToString()
Application("Images_Virtual_Path") =
ConfigurationSettings.AppSettings.Item
("Images_Virtual_Path").ToString()
Application("strAspxDefaultFile") =
ConfigurationSettings.AppSettings.Item
("Aspx_Default_File").ToString()
Application("DD_Menu_XML_CSS_File_Path") =
ConfigurationSettings.AppSettings.Item
("DD_Menu_XML_CSS_File_Path").ToString()
Application("DDMenuImagePath") =
ConfigurationSettings.AppSettings.Item
("DD_Menu_Image_Path").ToString()

Dim objblTopSection As New
myrootnamespace.Templates.blTemplateImageSection
Dim dtSupTopControl As DataTable
Dim intSupplierId As Integer
intSupplierId =
myrootnamespace.Utility_Manager.CommonFunctions.GetSupplie
rID(HttpContext.Current.Request.Url.GetLeftPart
(Uri_Partial.Authority))
dtSupTopControl =
objblTopSection.RetreiveCustomSupplierTop(intSupplierId)

Application("CustomizeTopNav") =
dtSupTopControl.Rows(0).Item("Customize")
If Not dtSupTopControl.Rows(0).IsNull
("CustomPageSize") Then
Application("CustomPageSize") =
dtSupTopControl.Rows(0).Item("CustomPageSize")
Else
Application("CustomPageSize") = 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 in
your Application_Start Event handler. The resson refreshing the browser
makes the error go away is that the Application_Start 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_Start
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_Start 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.

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+Start 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.

Kevin,

Really Global.asax.vb has only 142 lines.

Thanks
-Binoy

-----Original Message-----
I would start by looking
at "Admin.Global.Application_Start(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.

message
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-
[NullReferenceException: Object reference not set to an
instance of an object.]
Admin.Global.Application_Start(Object sender,
EventArgs e) +347

Anybody has any idea of what is happening?

Thanks in advance - Binoy


.



.


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top