Closed Seabizkit closed 4 years ago
i understand it having a hard time trying to decide when the route is the route or the controller with url which have the word "Source" in it, but I'm trying to tell it how to work through this, and it seems like it just doesn't work.
Like i get that its finding this hard as to where its a route or must match on controller, but im registering it with more specific first and even telling it when it applies with the constraints
/Org/Paradox/Importer/Source <-- source is controller where /Org/Paradox/Importer/Source/Template/1 <-- source is just routing info here and template is the controlller
Attribute routes are preferred by the routing system over conventional routes (Map*
). You could specify a route name to pick an exact template if you know the one you'd like to use.
This issue has been resolved and has not had any activity for 1 day. It will be closed for housekeeping purposes.
See our Issue Management Policies for more information.
so given the very detail explanation which i gave how would you make it work.
@pranavkm please give working example i made the effort to give as much detail as possible and was simply met with "Attribute routes are preferred by the routing system over conventional routes" I spent some time trying to get this to work and couldn't I got Attribute routes working in dotnet framework 4.7.2 like your suggesting but could not in core.
here is a lot of info leading up to this point; https://github.com/dotnet/AspNetCore.Docs/issues/17320#issuecomment-600437381
considering this as the register for endpoints basically register areas, and overrides, then default
if we now focus on the overriding*..so finally i have something like
but this doesn't let
https://localhost:44356/Org/Paradox/Importer/Source
where i have a Source Controller, and Index work andstill generates the wrong url 'https://localhost:44356/Org/Paradox/Importer/Template/Index/1' instead of 'https://localhost:44356/Org/Paradox/Importer/Source/Template/Index/1'
which for, on the Source/Index
generates url like:
if i have
and then on the Template controller put
then it will generate
but ideally its should pick up Index so should of been with Index omitted
and cant not get that to work.
example url which I'm trying to make available with correct url generation
Area = "", controller=Home , action = Index / Area = "Importer", controller=Dashboard , action = Index /Org/Paradox/Importer
Area = "Importer", controller=Source, action = Index /Org/Paradox/Importer/Source Area = "Importer", controller=Source, action = Create /Org/Paradox/Importer/Source/Create Area = "Importer", controller=Source, action = Edit /Org/Paradox/Importer/Source/Edit/1 Area = "Importer", controller=Source, action = Delete /Org/Paradox/Importer/Source/Delete/2
Area = "Importer", controller=Template, action = Index /Org/Paradox/Importer/Source/Template/1 Area = "Importer", controller=Template, action = Create /Org/Paradox/Importer/Source/Template/Create/1 Area = "Importer", controller=Template, action = Delete /Org/Paradox/Importer/Source/Template/Delete/1
Area = "Importer", controller=FileSpecifcation, action = Index /Org/Paradox/Importer/Source/Template/FileSpecifcation/1
Area = "Importer", controller=TransformationSystemSpecs, action = Index /Org/Paradox/Importer/Source/Template/TransformationSystemSpecs/1
example of the url syntax in Source Index page
example of url syntax in Template Index
I am having a really hard time, trying to get what I could get working in .net framework, in .net core.