Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sub folder and routing #38

Closed
philwindsor opened this issue Jun 27, 2019 · 2 comments
Closed

sub folder and routing #38

philwindsor opened this issue Jun 27, 2019 · 2 comments

Comments

@philwindsor
Copy link

This is from the sample site in the repo

Main content rendered by FEATURE:Foo:SubFoo:SubFooController::SubFoo

Given this path, I would expect the url route to be

http://localhost:8557/Foo/SubFoo

and not

http://localhost:8557/SubFoo/SubFoo

I have resorted to using Routes in my controllers to achieve the desired path but just wondering why it does this?

@aabenoja
Copy link

.AddFeatureFolders() does not override how routes are generated. Given the following from Configure() in Startup.cs

app.UseMvcWithDefaultRoute().UseMvc(routes =>
  routes.MapRoute(
    name: "areaRoute",
    template: "{area:exists}/{controller=Home}/{action=Index}/{id?}"));

we still use the default routing scheme of {controller=Home}/{action=Index}. In this regard, your SubFoo/SubFoo route makes perfect sense.

@philwindsor
Copy link
Author

ok thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants