Я хочу регистрировать все исключения на стороне сервера.
В ASP.NET я пишу что-то подобное в Global.asax.cs, но будет ли это работать и для службы WCF?
public class Global : HttpApplication
{
protected void Application_Error(object sender, EventArgs e)
{
Exception unhandledException = Server.GetLastError();
//Log exception here
...
}
}
UPDATE: я не хочу попробовать... ухватить за каждый [OperationContract] в моем .svc файле. Я коротко... Я хочу убедиться, что все исключения, которые вызывает мои службы, регистрируются log4net. Я не говорю о том, как клиент обрабатывает исключение.