ICallbackEventHandler exception handling fails miserably

G

Guest

I'm doing ajax calls using a webpage that implements ICallbackEventHandler.
I've set it up to run a javascript function client side when the process
completes and when the process throws an exception. Within my server side
client callback event handler, I do some data access and return a result. If
the data access layer throws an exception (it may throw five different ones),
I catch it, construct an appropriate message for the end user, and throw a
new Exception with this message. Supposedly, the caller of my event handler
should catch that exception and pass the message to my client side javascript
function that handles the exception. I've done this according to all the
examples and documentation (not including the docs that are 100% incorrect)
out there. And it works. Sort of. The problem is that when my error
handling javascript function is called, I get back not only my error message
but also about 50k of gibberish that looks like a cross between a viewstate
string and a binary file viewed in Notepad. This junk on the end of the
message, if displayed to the user, causes the browser to crash. I have two
questions:

1) Seriously, what the hell?
2) How do I stop this madness?

TIA.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top