Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MVC Style Bindings - Multiple actions were found ERROR #131

Open
freeranger opened this issue Apr 11, 2016 · 0 comments
Open

MVC Style Bindings - Multiple actions were found ERROR #131

freeranger opened this issue Apr 11, 2016 · 0 comments

Comments

@freeranger
Copy link

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 ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant