I tried this solution with Elmah.XmlFileErrorLog but I\'m getting following exception
System.ArgumentNullException was unhandled by user code
Message=\"Val
Are you running this code within ASP.NET? Seems like the HttpContext is null and this is causing the ELmah code to throw the exception -the method Elmah.ErrorSignal.FromCurrentContext() would pass HttpContext.Current from what I remember (been awhile since looked into it) to the Elmah.ErrorSignal.FromContext(HttpContext context) method and this seems to be null, which would not normally be the case in Asp.Net hosted stuff.
Another possibility is that this is occuring outside a request to the server so the HttpContext might be null