views:

36

answers:

1

I have a web project consisting of only web services. I need a global way of handling errors on the server so I can send emails, log in event log, etc. Global.asax doesn't work according to MSDN. How should I go about this? I have tried creating a soapExtension, but it is never hit.

A: 

May be this will help

http://www.developer.com/net/csharp/article.php/3088231/Exception-Handling-in-Web-Services.htm

RaviG
Actually, I should have mentioned this before. I'm not making SOAP calls to the web service. I'm using ScriptManager to add service references, which then creates a client-side proxy for making ajax calls. If I pull up Fiddler and look at the actual calls, they're not SOAP but JSON calls. Since they're not SOAP calls, the SoapExtensions mentioned in the article won't handle error in json calls. Is there any way I can make a JSONExtension instead of SoapExtension?
jusaskin