title: WCF REST service - DataContract stops constructor?
body: <p>I have a strange problem that's happening with my WCF REST service.  For an operation where it accepts data, let's say it accepts the Foo class:</p>
  
  <pre><code>[WebInvoke(Method = "PUT", UriTemplate = "users/{username}")]
  [OperationContract]
  public void UpdateLoginUser(string username, LoginUser userUpdated) {
  [...]
  }
  </code></pre>
  
  <p>Now my LoginUser class inherits from my NormalUser class:</p>
  
  <pre><code>&lt;DataContract()&gt; _
  Public MustInherit Class NormalUser
  [...]
  End Class
  
  Public Class LoginUser
   Inherits NormalUser
  [...]
  End Class
  </code></pre>
  
  <p>When I PUT to my service, triggering UpdateLoginUser, everything works OK.  However, if I apply DataContract to my NormalUser class:</p>
  
  <pre><code>&lt;DataContract()&gt; _
  Public Class LoginUser
   Inherits NormalUser
  [...]
  End Class
  </code></pre>
  
  <p>... suddenly, the LoginUser class's constructor doesn't fire during deserialization!  I have business login rules in there I need to run.  So, why is it that when I apply the     DataContract attribute to my inherited class, its constructor stops getting fired?  How can I get around this?  If I want to change namespace or name, I do need to apply the     DataContract attribute.</p>