请求的网址:http://localhost/api/access/blob
路线:
config.Routes.MapHttpRoute(
name: "AccessApi",
routeTemplate: "api/{controller}/{action}"
);
定义的动作:
public class AccessController : ApiController
{
// GET api/access/blob
[HttpGet]
public string Blob()
{
return "blob shared access signature";
}
// GET api/access/queue
[HttpGet]
public string Queue()
{
return "queue shared access signature";
}
}
结果:
Multiple actions were found that match the request:
System.String Blob() on type Project.Controllers.AccessController
System.String Queue() on type Project.Controllers.AccessController
为什么它没有找到合适的行动?