Closed michaelvolz closed 10 years ago
The Attribute routing is new and there are multiple issues with it! I'm stuck on a different one but I can see a few things to do on this one.
It IS very new, you are right. Any solution would be a great help. I think it will be not that uncommon to have AttributeRouting and Areas at the same time.
In think that my last checkin should fix the Attribute routing area issue. It's also related to RouteCollectionRoute, so I'm hoping for a full fix to all RouteCollectionRoute-related issues soon before releasing again.
I have updated the MVC 5.1 package. This should work in the latest version as a side-effect of the main fix from Alexandr Nikitin that finds the right route for attribute routing. If not, I can pull the other fix back in.
I am unsing the new MvcRouteTester for MVC 5.1.
The routetests for my top level area are working. All the routetests for any area throw the following exception:
Result Message: MvcRouteTester.Assertions.AssertionException : Expected 'MyAreaName', got no value for 'area' at url '/MyAreaname/Index'.
The controller is decorated with: [RouteArea( "MyAreaName" )]
The method is decorated with: [Route( "Index" )]
The test:
I have no area or routeconfiguration besides AttributeRoutes.
The route itself works in the browser .
Any suggestions?