I have two routes in my application, each in a different Controller
, that look like this:
[Route("forgot-password", Order = 1)]
[Route("{variable}", Order = 2)]
When I run the application I get the exception:
Multiple controller types were found that match the URL. This can happen if attribute routes on multiple controllers match the requested URL.
Remember these actions are in different Controllers
. The Order
attribute doesn't seem to work across Controllers
!.
How can I get this scenario to work in asp.net mvc routing
? I want to use attribute based routing and I don't want to change my urls.