title: Getting POST or PUT to work in a WCF REST Service
body: <p>I have a WCF Service and I am able to GET from it but I can’t work out how to PUT to it. I just want to increment a hits field each time the record is used in the client. Here is some of my code.</p>
  
  <p>Interface:</p>
  
  <pre><code>[OperationContract]
  [WebInvoke(Method = "PUT",
      ResponseFormat = WebMessageFormat.Json,
      BodyStyle = WebMessageBodyStyle.Wrapped,
      UriTemplate = "IncSMS")]
  void IncSMS();
  </code></pre>
  
  <p>Method:</p>
  
  <pre><code>public void IncSMS()
  {
      var business =
          (from p in _db.Businesses
              where p.BusinessID == 1
              select p).FirstOrDefault();
      business.SMSHits += 1;
      _db.SaveChanges();
  }
  </code></pre>
  
  <p>I’m getting “Method not allowed.” In IE, can anyone see what I’m doing wrong???</p>
  
  <p>Cheers,</p>
  
  <p>Mike.</p>