You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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()
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: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 ;)The text was updated successfully, but these errors were encountered: