Web API 405 Method Not Allowed In Remote
问题 Following is one my action: public IHttpActionResult PutUnit(int id, Unit unit) { if (!ModelState.IsValid) return BadRequest(ModelState); if (id != unit.UnitId) return BadRequest(); db.Entry(unit).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!UnitExists(id)) { return NotFound(); } else { throw; } } return StatusCode(HttpStatusCode.NoContent); } Following is the response I get: Date: Tue, 19 Aug 2014 10:30:31 GMT Server: Microsoft-IIS/8.5 X