title: WCF - Overhead of throwing FaultExceptions within your service
body: <p>I posted a <a href="https://stackoverflow.com/questions/81306/wcf-faults-exceptions-versus-messages">question</a> about using Messages versus Fault Exceptions to communicate business rules between services.</p>
  
  <p>I was under the impression it carried overhead to throw this exception over the wire, but considering it's just a message that get serialized and deserialized, they were in fact one and the same.</p>
  
  <p>But this got me thinking about throwing exceptions in general or more specifically throwing FaultExceptions.</p>
  
  <p>Now within my service, if i use</p>
  
  <pre><code>throw new FaultException
  </code></pre>
  
  <p>to communicate a simple business rule like "Your account has not been activated",
  What overhead does this now carry?
  Is it the same overhead as throwing regular exceptions in .NET? or does WCF service handle these more efficiently with the use of Fault Contracts.</p>
  
  <p>So in my user example, which is the optimal/preferred way to write my service method</p>
  
  <p>option a</p>
  
  <pre><code>public void AuthenticateUser()
  {
      throw new FaultException("Your account has not been activated");
  }
  </code></pre>
  
  <p>option b</p>
  
  <pre><code>public AutheticateDto AutheticateUser()
  {
       return new AutheticateDto() { 
            Success = false,
            Message = "Your account has not been activated"};
  }
  </code></pre>