handling exceptions thrown by web service methods ON THE SERVER

Discussion in 'ASP .Net Web Services' started by Sergei Shelukhin, Feb 9, 2007.

  1. Hi.

    We have a web service that gets called using http (e.g. no SOAP calls,
    SoapExtensions do not work) and we need to get information about
    errors occuring in Web service methods. Web sefvice methods
    themselves are nothing but a single line calls to BO methods; we want
    to enable (or rather, re-enable from pre-WS times) logging and mailing
    of the errors in Bo classes for WS calls.
    ASP.NET however eats the exceptions propagating them to the client.

    Is there any way to handle the errors apart from putting try...catch
    in every method?
    Sergei Shelukhin, Feb 9, 2007
    #1
    1. Advertising

  2. Sergei Shelukhin

    Teemu Keiski Guest

    Unfortunately there don't seem to be lot of options but handling the errors
    in try...catch on the web service at method level. Using Application_Error
    in global.asax would be quite good, but it doesn't work with web services
    (described at: http://msdn2.microsoft.com/en-us/library/ds492xtk.aspx)

    --
    Teemu Keiski
    AspInsider, ASP.NET MVP
    http://blogs.aspadvice.com/joteke
    http://teemukeiski.net





    "Sergei Shelukhin" <> wrote in message
    news:...
    > Hi.
    >
    > We have a web service that gets called using http (e.g. no SOAP calls,
    > SoapExtensions do not work) and we need to get information about
    > errors occuring in Web service methods. Web sefvice methods
    > themselves are nothing but a single line calls to BO methods; we want
    > to enable (or rather, re-enable from pre-WS times) logging and mailing
    > of the errors in Bo classes for WS calls.
    > ASP.NET however eats the exceptions propagating them to the client.
    >
    > Is there any way to handle the errors apart from putting try...catch
    > in every method?
    >
    Teemu Keiski, Feb 15, 2007
    #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. Winista

    Unhandled Exceptions thrown

    Winista, Mar 22, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    387
    Winista
    Mar 22, 2006
  2. Adam Maass
    Replies:
    5
    Views:
    394
    Sudsy
    Jul 22, 2003
  3. Mike Schilling
    Replies:
    2
    Views:
    343
    Mike Schilling
    Jul 16, 2003
  4. Doug Perkes

    handling exceptions in asynchronous web service calls

    Doug Perkes, Aug 6, 2004, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    173
    Jeffrey Hasan
    Aug 9, 2004
  5. Water Cooler v2

    Exceptions thrown by Web Services

    Water Cooler v2, Feb 24, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    98
    Water Cooler v2
    Feb 24, 2006
Loading...

Share This Page