Routes added via WebApplication get attached to the last UseRouting call #35281
Labels
area-minimal
Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
feature-minimal-actions
Controller-like actions for endpoint routing
old-area-web-frameworks-do-not-use
*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels
Milestone
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
Today we add routes from the
WebApplication
we copy the route data sources to the last call toUseEndpoints
, this results in bizzare behavior when adding multiple calls to UseRouting and UseEndpoints.To Reproduce
If you request / you'll see "Selected endpoints is null". It's because the middleware runs after the first UseRouting middleware but the route is matched in the second UseRouting middleware.
The text was updated successfully, but these errors were encountered: