Object reference not set to an instance of an object. System.Web.UI.WebControls.ListItemCollection.

B

Brano

HI all,

I have a problem i have a web application that was working fine and
this morning when i run it and click on a button that does
Reponse.Redirect to a page i get this error :

Server Error in '/IPFWEb_6' Application.
--------------------------------------------------------------------------------

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not
set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.


Stack Trace:


[NullReferenceException: Object reference not set to an instance of an
object.]
System.Web.UI.WebControls.ListItemCollection.SaveViewState()
System.Web.UI.WebControls.ListControl.SaveViewState()
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState)
System.Web.UI.Page.ProcessRequestMain()


I have tried to step thru the code but there is nothing wrong with it.
I have even tried to use older version of this application that was
definetly working and i still get the same error. I have reviewed some
posts and one of them said it is cased by the TRACE if it is on but my
trace is OFF. Does anyone have an idea what is this?

Please help,

Thanks BRANO
 
A

Alvin Bruney - ASP.NET MVP

set your debugger to break on all exceptions. that should get the debugger
to attach to the process on the line that caused the exception. You should
be able to follow on from there.

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
 
B

Brano

Hi Alvin,

That sounds great but i dont know how to set the debuger to break at
all exceptions can you help me? Thanks
 
K

Kevin Spencer

In Visual Studio, look in the Debug menu, at "Exceptions..."

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Complex things are made up of
Lots of simple things.
 

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,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top