G
Guest
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(CommandEventArgs e) at
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at
System.Web.UI.Page.ProcessRequestMain()"
Thanks
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(CommandEventArgs e) at
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at
System.Web.UI.Page.ProcessRequestMain()"
Thanks