I have a webapi controller
public class MyController : ApiController
{
[HttpPost]
public SomeResult MyAction(string name, string message)
{
return SomeResult.???;
}
}
I have an angular controller calling this method
$http
.post("/api/My/MyAction", { name: "bob", message: "hello" })
.then(function(xhr) { ... }, function(xhr) { ... });
I get this result
Server error in application "/".
Resource is not found.
What have I done wrong?
PS This is not a URL ... It works when I use HttpGetand add parameters to the query string.
source
share