title: Error 404 from ReST POST request method
body: <p>I would like to create a web application that accepts a single POST method to update a db, using a ReSTful structure. </p>
  
  <p>My problem is that when I post a JSON object to the URL (using fiddler) I receive an error 404.</p>
  
  <p>The method I am trying to call is exposed using the attributes below: </p>
  
  <pre><code>[WebInvoke(Method="POST", UriTemplate="projectors", RequestFormat=WebMessageFormat.Json,BodyStyle=WebMessageBodyStyle.Wrapped )]
  [OperationContract]
  void RecordBreakdown(string sn, int modelCode); 
  </code></pre>
  
  <p>The web config file has a service that binds to the exposed method, below is an abstraction:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
    &lt;bindings/&gt;
    &lt;services&gt;
        &lt;service name="VIServiceToolServiceLibrary.ProjectorService"
                 behaviorConfiguration="RESTBehaviour"&gt;
        &lt;endpoint address="" 
                binding="webHttpBinding"
                contract="VIServiceToolServiceLibrary.IProjectorService"
                 behaviorConfiguration="RESTEndPointbehaviour"  /&gt;
        &lt;host&gt;
          &lt;baseAddresses&gt;
            &lt;add baseAddress="http://localhost:8080/projectorservice/" /&gt;
          &lt;/baseAddresses&gt;
        &lt;/host&gt;
      &lt;/service&gt;
    &lt;/services&gt;
  
  &lt;behaviors&gt;      
    &lt;serviceBehaviors&gt;
      &lt;behavior name="RESTBehaviour"&gt;
        &lt;serviceMetadata httpGetEnabled="true"/&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;      
    &lt;endpointBehaviors&gt;
      &lt;behavior name="RESTEndPointbehaviour"&gt;
        &lt;webHttp/&gt;
      &lt;/behavior&gt;
    &lt;/endpointBehaviors&gt;      
  &lt;/behaviors&gt;
  </code></pre>
  
  <p>If I run the web app in VS or by IIS I can see the svc file okay:</p>
  
  <pre><code>http://localhost:5970/Service.svc
  http://localhost/vi/Service.svc
  </code></pre>
  
  <p>But when I post a request I receive an error 404 message</p>
  
  <pre><code>POST http://localhost/vi/projectors HTTP/1.1
  User-Agent: Fiddler
  Host: localhost
  Content-Length: 27
  
  {sn:"23434", modelCode:34 }
  </code></pre>
  
  <p>Thanks</p>