If the exception gets to the server update panel, can you somehow see the stack trace?

I am trying to debug a third-party library, which in some cases throws a link reference exception, but I get an exception only from the javascript side, which does not contain the stack trace in the error message.

Is there a value in the scriptmanager or something similar with additional information about the exception, or should I remove the update panels to get the original exception?

(It’s easier said what has been done, its nested several update panels are deep)

Thank!

+3
source share
2 answers

Watch the ScriptManager.AsyncPostBackErrorevent.

You can do something like this

protected void ScriptManager1_AsyncPostBackError(object sender, AsyncPostBackErrorEventArgs e)
{
        //do something with the exception
        log(e.Exception.Message);

        // show a message to the user.
        ScriptManager1.AsyncPostBackErrorMessage =
            "An  error occurred." + e.Exception.Message;
    }
}
+4
source

ajax , EnablePartialRendering ScriptManager false.

0

All Articles