title: jQuery put with WebApi - Not even calling the Controller method
body: <p>Sorry to ask a question about this so soon after asking another question but I'm now struggling with the PUT. </p>
  
  <p>I have a jQuery method which collects the data and passes it to a PUT function in the valuescontroller. But the controller isn't even being called (As I have a break point on it and it isn't breaking) </p>
  
  <p>Can I just check my jQuery is correct? </p>
  
  <pre><code>var data = {
              id: truckId,
              obj: {
                  TruckId: truckId,
                  Reg: reg,
                  Description: desc,
                  Condition: condition
              }
          };
          var json = JSON.stringify(data)
  
          $.ajax({
              url: '/api/Values',
              type: 'PUT',
              contentType: "application/json; charset=utf-8",
              data: json,
              success: function (results) {
                  $.getJSON("api/Values", LoadTrucks);
                  alert('Truck Updated !');
              }
          })
  </code></pre>
  
  <p>The controller looks like this: </p>
  
  <pre><code>public void Put(int id, TruckInfo obj)
      {
          WebApiTestEntities db = new WebApiTestEntities();
  
          var data = from item in db.TruckInfoes
                     where item.TruckId == id
                     select item;
          TruckInfo oldRecord = data.SingleOrDefault();
          oldRecord.Reg = obj.Reg;
          oldRecord.Description = obj.Description;
          oldRecord.Condition = obj.Condition;
          db.SaveChanges();
      }
  </code></pre>
  
  <p>Now it looks to me like that should at least be reaching the Controller. My guess is the parameters aren't being passed correctly and therefore it is looking for a different method but I can't see why or how to rectify that. </p>
  
  <p>Any help would be greatly appreciated :) </p>
  
  <p>Lex</p>
  
  <p>EDIT: As requested, further information. </p>
  
  <p>No Javascript errors on the error console. </p>
  
  <p>The Console log displays the following: </p>
  
  <p>{"Message":"No HTTP resource was found that matches the request URI 'localhost:62997/api/Values'.","MessageDetail":"No action was found on the controller 'Values' that matches the request."}</p>
  
  <p>And under MessageDetail for the JSON console I get this (Which supports my theory on incorrect parameters I think) </p>
  
  <p>"No action was found on the controller 'Values' that matches the request"</p>
  
  <p>The get however succeeds. (And the POST I got working earlier this morning.)  </p>