title: How to catch wcf service thrown exception at client side
body: <p>Inside my Form_Load <code>background_worker_DoWork</code> is started where I'm using wcf service call to get countAllBooksValue. At service I'm throwing Fault exception where that exception should be catched by the client, but it doesn't.</p>
  
  <p>client side</p>
  
  <pre><code>private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
          {
              try
              {
                  int countAllBooks = BookAgent.CountAllBooks();
                  e.Result = countAllBooks;
              }
              catch (FaultException ex)
              {
                  MessageBox.Show(ex.Message);                             
              }            
          }
  </code></pre>
  
  <p>service side</p>
  
  <pre><code>public int CountAllBooks()
  {
     throw new FaultException("Something bad happened!");
  }
  </code></pre>
  
  <p>Question is: Why this FaultException is not catched by the client?</p>