I have an application that, on my development PC and in production, throws
unexpected null reference exceptions when returning from the click event
handler of a button. The only fix is to do an IISReset or to reboot the
server. This is obviously not acceptable in production.
The call stack shows non-user code, and my code works most of the time, so I
have to assume it is internal to ASP.Net. The exception never occurs in the
hander, only upon exiting the handler. The only way to catch the exception
is in the Application_Error method in Global.asax.
The stack trace is:
StackTrace: " at System.Web.UI.Control.OnBubbleEvent(Object source,
EventArgs args) at System.Web.UI.Control.RaiseBubbleEvent(Object source,
EventArgs args) at
System.Web.UI.WebControls.Button.OnCommand(Command EventArgs e) at
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) at
System.Web.UI.Page.ProcessRequestMain()"
Thanks
--
Dale Preston
MCAD C#
MCSE, MCDBA