The following code
public class OrderController : Controller
{
// GET api/values
public IEnumerable<string> Get()
{
return new string[] { "value1", "value2" };
}
// GET api/values/5
public string Get(int id)
{
return "value";
}
}
It can work well on ASP.NET 4.5,but it doesn't work on dotnet core 1.1 .The Error Messsage:
fail: Microsoft.AspNetCore.Mvc.Internal.ActionSelector[1] Request matched multiple actions resulting in ambiguity. Matching actions: WebAPI.Controllers.OrderController.Get (WebAPI) WebAPI.Controllers.OrderController.Get (WebAPI)
fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HL3F88N44HR6": An unhandled exception was thrown by the application. Microsoft.AspNetCore.Mvc.Internal.AmbiguousActionException: Multiple actions matched. The following actions matched route data and had all constraints satisfied: WebAPI.Controllers.OrderController.Get (WebAPI) WebAPI.Controllers.OrderController.Get (WebAPI)