I'm getting a 405 Method not found error when trying to use a $http.put in angular to my Web api controller.
I've tried about everything I can find out there, mostly having to do with WebDav. I have another Web api project I've done and never ran into this issue. Below is my sample call within angular. It's frusterating, I have everything basically the same in web config of another Web api project that seems to work fine.
return $http.put("/api/Account/PasswordChange",{params:{"currentPass":currentPass,"newPass":newPass,"confirmPass":confirmPass}})
.then(function (response) {
return response.data;
},
function (response) {
return $q.reject(response);
});
Here is my web api routing
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
and here is web api controller being called
public IHttpActionResult PutPasswordChange(string currentPass,string newPass,string confirmPass)
{
return Ok();
}