Skip to content

Two endpoints are handling the request when use DynamicRouteValueTransformer #28702

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

Closed
sefacan opened this issue Dec 17, 2020 · 3 comments
Closed
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates feature-routing investigate
Milestone

Comments

@sefacan
Copy link

sefacan commented Dec 17, 2020

Describe the bug

Two endpoints are handling the request when use DynamicRouteValueTransformer
When I try to go "/contact-us" page, "ContactUs" action is invoking and PageRouteTransformer is handling the request.

By the way, All trasformers are handling static files. I'm using the ContentTypeFileProvider for skip handling but it has a big freaking dictionary for mime-types. It's not suitable for performance.

To Reproduce

// contact us
endpoints.MapControllerRoute("ContactUs",
    "contact-us",
    new { controller = "Page", action = "ContactUs" });

// pages
endpoints.MapControllerRoute("Page",
    "{sename}",
    new { controller = "Page", action = "Detail" });

// for dynamic pages
endpoints.MapDynamicControllerRoute<PageRouteTransformer>("{sename}");

Further technical details

.NET SDK (reflecting any global.json):
Version: 5.0.101
Commit: d05174dc5a

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19042
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.101\

Host (useful for support):
Version: 5.0.1
Commit: b02e13abab

.NET SDKs installed:
2.2.207 [C:\Program Files\dotnet\sdk]
3.1.201 [C:\Program Files\dotnet\sdk]
3.1.402 [C:\Program Files\dotnet\sdk]
3.1.404 [C:\Program Files\dotnet\sdk]
5.0.101 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Microsoft Visual Studio Community 2019 Version 16.8.3

@Pilchie Pilchie added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Dec 17, 2020
@pranavkm pranavkm added this to the Next sprint planning milestone Dec 17, 2020
@ghost
Copy link

ghost commented Dec 17, 2020

Thanks for contacting us.
We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We will evaluate the request when we are planning the work for the next milestone. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@pranavkm
Copy link
Contributor

FYI @javiercn

@omfgicbf
Copy link

Is this the same as #21083?

In #21083 it seems to have been an issue in 3.1 that was addressed as part of #25073, so it's not clear if:

  • It was fixed and should work now but doesn't,
  • It's just not expected to work yet and is being considered for a future release, or
  • This is a different issue

@javiercn javiercn added the jcn-p1 label Nov 5, 2021
@sefacan sefacan closed this as completed Sep 4, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Oct 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates feature-routing investigate
Projects
None yet
Development

No branches or pull requests

6 participants