title: WCF Faulted State
body: <p>How can a WCF <code>CommunicationObject</code> transition to a faulted state: I created a WCF library in Visual Studio, deployed it into IIS, inside it i have two methods:</p>
  
  <pre><code>    public string GetData(int value)
      {
          throw new FaultException(value.ToString());
      }
  
      public CompositeType GetDataUsingDataContract(CompositeType composite)
      {
          throw new TestException();
      }
  </code></pre>
  
  <p>From the client, i simply call these two methods over and over again, however, the <code>CommunicationObjectFaultedException</code> is not thrown at any time.</p>
  
  <p>I read in an article <a href="http://blogs.msdn.com/b/pedram/archive/2008/01/25/wcf-error-handling-and-some-best-practices.aspx" rel="nofollow">WCF error handling and some best practices</a> that non-FaultExceptions are converted by default "automatically" to a FaultException. If this is right, then when and how does the WCF client's communication object become in a faulted state?</p>
  
  <p>One other thing, does anybody know any MSDN reference that confirms that <code>FaultException</code> is the best way to make sure the WCF communication object does not transition into <code>Faulted state</code>.</p>