Handling Exception in Web Services when using HttpGet protocol.

From: Sherif ElMetainy (elmeteny_at_thewayout.net)
Date: 05/25/04

  • Next message: Sherif ElMetainy: "How can I use Soap Extensions to change exception returned by the server."
    Date: Tue, 25 May 2004 22:18:14 +0300
    
    

    Hello

    I have an application with several web services. I want to be able to log
    all exception are thrown by any web method. Since the web services handler
    catches and swallows all exceptions, and send them to the client in a soap
    message, Global.asax's Application_Error method can't be used. So I made a
    SoapExtension class that override ProcessMessage method. That solution
    worked for HttpSoap protocol.
    The problem is that my application web.config also enables the HttpGet
    protoco because some clients needs it. When a client calls my web services
    using HttpGet, the soap extensions are not invoked, and also Context.Error
    is null. I can only know that an error occured in Application_EndRequest
    method by checking that Response.StatusCode is 500. But I don't know how do
    I get information about the exception itself.

    Any help would be appreciated, thanks in advance.

    Best regards,
    Sherif


  • Next message: Sherif ElMetainy: "How can I use Soap Extensions to change exception returned by the server."

    Relevant Pages