Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi all,

 

i'm very new to .Net and still getting my bearings with things. One thing thats really annoying is that i find the error messages are now more cryptic then ever before, for example see below:

 

Can anyone suggest, is there any way to get more accurate or detailed error messages with Asp.Net (VB).

 

Excuse my ignorance.

 

Cheers

 

s73310

 

Oh, and any suggestions on the below error message would also be much appreciatted :

*grin*

 

 

Server Error in '/' 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.]

edc.DepartmentsList.Page_Load(Object sender, EventArgs e) in C:\Documents and Settings\Administrator\VSWebCache\edc\UserControls\Datalist.ascx.vb:39

System.Web.UI.Control.OnLoad(EventArgs e) +67

System.Web.UI.Control.LoadRecursive() +35

System.Web.UI.Control.LoadRecursive() +98

System.Web.UI.Control.LoadRecursive() +98

System.Web.UI.Page.ProcessRequestMain() +731

 

 

 

 

--------------------------------------------------------------------------------

Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

Guest mutant
Posted

I dont think there is a way to get better messages.

But tell us your problem and how/when it happens, maybe well be able to help you.

  • Moderators
Posted

I can tell you that the error occured in your Page_Load event.

Use a Try/Catch to handle your errors, when you catch an error send it to the browser in a Label or Response.Write.

Visit...Bassic Software
Posted

The error message seems pretty clear to me. :confused:

 

Just to sort of repeat what the above has said, use a try catch block on code that can possibly throw an error. Look up in the object browser what exceptions they can throw, and deal with each exception individually and appropriately, that way you can throw your own meaningful errors based on the exception thrown.

Gamer extraordinaire. Programmer wannabe.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...