Open
Description
If I have a controller with two GET actions - e.g /api/get and /api/get/:id, when I add [MvsStyleBinding]
to my controller, I get the following error:
An error has occurred.
ExceptionMessage: Multiple actions were found that match the request:
Get on type MvcStyleBindingProblem.ValuesController
GetById on type MvcStyleBindingProblem.ValuesController
ExceptionType:System.InvalidOperationException
StackTrace: at System.Web.Http.Controllers.ApiControllerActionSelector.ActionSelectorCacheItem.SelectAction(HttpControllerContext controllerContext)
at System.Web.Http.Controllers.ApiControllerActionSelector.SelectAction(HttpControllerContext controllerContext)
at System.Web.Http.ApiController.ExecuteAsync(HttpControllerContext controllerContext, CancellationToken cancellationToken)
at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()
I have a very simple api project here demonstrating the problem:
https://github.com/freeranger/MvcStyleBindingProblem
If I remove the[MvcStyleBinding]
then the error goes away but obviously the whole point is to actually use it ;)
Metadata
Metadata
Assignees
Labels
No labels