title: How do I create a global exception handler for a WCF Services?
body: <p>I want to log all exceptions <strong>server side</strong>.</p>
  
  <p>In ASP.NET I write something like this in Global.asax.cs, but will this work for a WCF service, too?</p>
  
  <pre><code>public class Global : HttpApplication
  {
      protected void Application_Error(object sender, EventArgs e)
      {
          Exception unhandledException = Server.GetLastError();
  
          //Log exception here
          ...
      }
  } 
  </code></pre>
  
  <p>UPDATE: I don't want to have a try...catch for every [OperationContract] in my .svc file. I short... I want to make sure that all exception that my service throws is logged by log4net. I'm not talking about how the client handles exception.</p>