We help IT Professionals succeed at work.

ASP.Net Error - inner stack trace reveals no line number - why?

MattMarx
MattMarx asked
on
557 Views
Last Modified: 2007-12-19
I am currently experiencing an error on my page Pre_Render event.  There is quite a bit of code in there, so it is difficult for me to determine exactly what is causing it.

For other errors on my pages, I usually get a nice line number telling me where the error has occurred.  However, on this inner stack trace, I get NOTHING!  Why???

Here's the stack trace:

System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at MySite.TheMainPage.Page_PreRender(Object sender, EventArgs e)
   at System.Web.UI.Control.OnPreRender(EventArgs e)
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain()
   --- End of inner exception stack trace ---
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain()
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Comment
Watch Question

Rounded IT Consultant / Projects manager / Cloud Consultant / IT Planning
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Top Expert 2004

Commented:
>Object reference not set to an instance of an object.

That's the problem....and as Silvers mentioned, you're referencing an object that has not been Set.  Check all you objects....if you're usnig Visual Studio (code behind), it should show you where the problem is....
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.