title: What does adding Name and Namespace to DataContract do?
body: <p>I tried calling a WebInvoke method called Register which returns takes in a User object and immediately just returns that object.  It looks like the following:</p>
  
  <pre><code>User Register(User user)
  {
      return user;
  }
  </code></pre>
  
  <p>I am not sure what the Name and Namespace attributes do to the DataContract attribute when calling <a href="http://localhost:8081/user/register" rel="noreferrer">http://localhost:8081/user/register</a> for example?</p>
  
  <p>The reason I ask is because I initially had my class decorated with the DataContract attribute like this:</p>
  
  <pre><code>[DataContract]
  public class User
  {
     // Properties
  }
  </code></pre>
  
  <p>When I opened up Fiddler, and sent a Post request, it said method not allowed, but when I changed DataContract to:</p>
  
  <pre><code>[DataContract(Name="User", Namespace="")]
  </code></pre>
  
  <p>It worked.</p>