How to throw Application_Errors as SOAP-Exception

Discussion in 'ASP .Net' started by Guest, Feb 25, 2004.

  1. Guest

    Guest Guest

    Hello NG!

    Within the global.asax of my WebService I can catch unahandled exceptions:

    Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)

    In my opinion an exception always is caused by a client-request. So is it
    possible within that method to force excectly that request (which is maybe
    one of some at the same time) to throw a (SOAP)-Exception (which can be
    catched at the client) ?

    My problem until now is, that ASP.NET tries to send an HTML-formatted error
    description to the client, but there it can't be handled, because the
    WebMethod call expects XML (SOAP) not HTML. So I see no chance to get the
    "reel" exception on the client and present it to the user.

    Thanks, D.Barisch
     
    Guest, Feb 25, 2004
    #1
    1. Advertising

  2. Your post went unanswered. Have you resolved this issue?

    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    http://tinyurl.com/3he3b
    <Daniel Barisch> wrote in message
    news:%23M9SEw4%...
    > Hello NG!
    >
    > Within the global.asax of my WebService I can catch unahandled exceptions:
    >
    > Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
    >
    > In my opinion an exception always is caused by a client-request. So is it
    > possible within that method to force excectly that request (which is maybe
    > one of some at the same time) to throw a (SOAP)-Exception (which can be
    > catched at the client) ?
    >
    > My problem until now is, that ASP.NET tries to send an HTML-formatted

    error
    > description to the client, but there it can't be handled, because the
    > WebMethod call expects XML (SOAP) not HTML. So I see no chance to get the
    > "reel" exception on the client and present it to the user.
    >
    > Thanks, D.Barisch
    >
    >
     
    Alvin Bruney [MVP], Mar 2, 2004
    #2
    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. Kerri
    Replies:
    2
    Views:
    13,116
    Kevin Spencer
    Oct 27, 2003
  2. z. f.

    throw exception in the finalize

    z. f., Jul 5, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    458
    avnrao
    Jul 5, 2004
  3. Replies:
    15
    Views:
    7,760
    Roedy Green
    Sep 8, 2005
  4. Emanuele D'Arrigo

    To throw or to throw not?

    Emanuele D'Arrigo, Nov 14, 2008, in forum: Python
    Replies:
    6
    Views:
    349
    Emanuele D'Arrigo
    Nov 15, 2008
  5. John Saunders
    Replies:
    0
    Views:
    426
    John Saunders
    Aug 23, 2006
Loading...

Share This Page