Is there an existing issue for this?
Describe the bug
The pattern paramter of Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions.MapFallback is ignored when EnableRequestDelegateGenerator is true
This means that the following code only works when EnableRequestDelegateGenerator is set to false
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
app.MapFallback("{*path}", (HttpContext context) => "this is {*path}");
app.MapFallback("{*path:nonfile}", (HttpContext context) => "this is {*path:nonfile}");
app.Run();
but if I run the code with EnableRequestDelegateGenerator set to true 😥
Connection id "0HNKBFUONIV8B", Request id "0HNKBFUONIV8B:00000003": An unhandled exception was thrown by the application.
Microsoft.AspNetCore.Routing.Matching.AmbiguousMatchException: The request matched multiple endpoints. Matches:
{*path:nonfile}
{*path:nonfile}
at Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.ReportAmbiguity(Span`1 candidateState)
.NET Version
11.0.100-preview.2.26159.112
Is there an existing issue for this?
Describe the bug
The pattern paramter of Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions.MapFallback is ignored when EnableRequestDelegateGenerator is true
This means that the following code only works when EnableRequestDelegateGenerator is set to false
but if I run the code with EnableRequestDelegateGenerator set to true 😥
.NET Version
11.0.100-preview.2.26159.112