donderdag, januari 19, 2006

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

When you receive this error, stop searching for a solution, first try to restart IIS (if that doesn't work: restart your pc) and check if the error is still there.... It worked with me, after searching an hour for a solution....

I also noticed that the vs 2003 debugger went very slow when the error occures


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.Control.OnBubbleEvent(Object source, EventArgs args)
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()