asp.net - Handle exceptions in web services with Elmah -


Is there a way to handle exceptions globally in the ASP.NET Web Service (ASMX) as we Do the .net web site in ASP?

ASP.NET Web Services Never fire Application_Error Event and exceptions to ELMAH Can not be globally controlled such as ASP.NET apps but we can log exceptions to using "manually" ELMAH:

  public int WebServiceMethod () {Try} {{}} (Exception preceding) {Elmah.ErrorLog.GetDefault (HttpContext.Current) logs (new Elma error (formerly, HTTP Context.)); }}  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -