Skip to content

Do candidate actions have to appear in log if multiple matches? #83

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

Closed
xperiandri opened this issue Feb 11, 2017 · 2 comments
Closed

Do candidate actions have to appear in log if multiple matches? #83

xperiandri opened this issue Feb 11, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@xperiandri
Copy link

In log I see

Microsoft.AspNetCore.Mvc.Versioning.ApiVersionActionSelector:Information: Multiple candidate actions were found, but none matched the requested service API version '1'. Candidate actions:

And I can't figure out what is wrong/

@commonsensesoftware
Copy link
Collaborator

The candidate action list is a multi-line list of candidates that the routing infrastructure discovered. If you don't see any matches, then there aren't any candidates. This process happens before any API version-related logic and is unchanged from the default, built-in behaviors. If you're not seeing any candidates, then I suspect that your routes are not configured correctly (either by template or attributes).

@commonsensesoftware
Copy link
Collaborator

After some investigation, this looks like a bug in ApiVersionActionSelector.cs (Line 215). The logged set of candidate action names should derive from candidates instead of context.MatchingActions (which may be none). Good catch.

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

No branches or pull requests

2 participants