There's a mismatch between how mvc matches some of the routes inside an area that are specified with RouteAttribute and how the javascript route helper is matching them.
The repo that reproduces the issue is here. Basically this is what is happening:
For some reason, mvc generates the following route for CategoriesController.Some:
That's why routejs thinks it's an attribute route outside any area. I guess we expected mvc to include thearea default also even if the route is attributed.
I'm not sure how we're supposed to solve this if mvc6 is not generating area default in this case. As it appears the logic of matching is not the same between mvc5/mvc6.
This is tested in AspNet5 only.
There's a mismatch between how mvc matches some of the routes inside an area that are specified with
RouteAttribute
and how the javascript route helper is matching them.The repo that reproduces the issue is here. Basically this is what is happening:
For some reason, mvc generates the following route for CategoriesController.Some:
That's why routejs thinks it's an attribute route outside any area. I guess we expected mvc to include the
area
default also even if the route is attributed.I'm not sure how we're supposed to solve this if mvc6 is not generating
area
default in this case. As it appears the logic of matching is not the same between mvc5/mvc6.