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.
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.