ICallbackEventHandler exception handling fails miserably

Discussion in 'ASP .Net' started by =?Utf-8?B?V2lsbGlhbSBTdWxsaXZhbg==?=, May 1, 2006.

  1. 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.
     
    =?Utf-8?B?V2lsbGlhbSBTdWxsaXZhbg==?=, May 1, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. begemot

    ICallbackEventHandler and Mozilla

    begemot, Jun 21, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,240
    begemot
    Jun 22, 2005
  2. JimGreen

    ICallbackEventHandler Q????

    JimGreen, Oct 14, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    419
  3. Maya Nasri

    ASP.NET 2 ICallbackEventHandler

    Maya Nasri, Nov 1, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    3,016
  4. Atanas Banov
    Replies:
    8
    Views:
    652
    Jeffrey Schwab
    Mar 3, 2006
  5. Peter
    Replies:
    34
    Views:
    1,942
    James Kanze
    Oct 17, 2009
Loading...

Share This Page