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
{{ message }}
This repository was archived by the owner on Nov 27, 2018. It is now read-only.
Ok given these routes, and this url http://example.com/ptslug/slug it should be clear that the bottom most route and accompanied action should be triggered.
However, as I have debugged the http://github.com/aspnet/Mvc project it does not even get to the point of selecting an action, which normally happens in the ActionSelector. Breakpointing this class revealed that it did not get entered.
Changing this routes' Order to any number (either putting it in front of all the other routes or behind them) fixes this.
[...][HttpGet("{ptSlug}/{slug}",Order=1)]
public Task<Model>GetByPath(...){ ...}
In turn it enters the ActionSelector and onwards into my code.
What is going on here?
The text was updated successfully, but these errors were encountered:
@NinoFloris did you intend ptSlug to be that literal string or a variable? That is should the last attribute be [HttpGet("ptSlug/{slug}")] or perhaps [HttpGet("ptSlug/slug")]?
We weren't iterating the route matching tree correctly in some scenarios, we were returning the previous node. The fix was to replace the counter that was being used an use the Depth property on the node instead.
Ok given these routes, and this url
http://example.com/ptslug/slug
it should be clear that the bottom most route and accompanied action should be triggered.However, as I have debugged the http://github.com/aspnet/Mvc project it does not even get to the point of selecting an action, which normally happens in the ActionSelector. Breakpointing this class revealed that it did not get entered.
Changing this routes'
Order
to any number (either putting it in front of all the other routes or behind them) fixes this.In turn it enters the ActionSelector and onwards into my code.
What is going on here?
The text was updated successfully, but these errors were encountered: