Skip to content

Document appcontext switch for catch all routing fix #18072

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
rynowak opened this issue Apr 30, 2020 · 1 comment · Fixed by #18792
Closed

Document appcontext switch for catch all routing fix #18072

rynowak opened this issue Apr 30, 2020 · 1 comment · Fixed by #18792

Comments

@rynowak
Copy link
Member

rynowak commented Apr 30, 2020

See: dotnet/aspnetcore#21114

This is a relatively impactful bug that we're fixing with an opt-in switch in an upcoming patch. Once this is gone out in servicing we should document the switch prominently.

This should go in the 3.1 version of the main routing doc where catch all routes are discussed, as well as in the 2.2->3.X migration docs. Users porting an app from 2.1->3.1 have a high potential to be broken if they make use of catch all routes in some specialized ways.

This bug is already fixed in 5.0, so we don't need to document the workaround there.

The fix looks like:

AppContext.SetSwitch("Microsoft.AspNetCore.Routing.UseCorrectCatchAllBehavior", true);

Put this in Program.Main as the first statement.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@Rick-Anderson
Copy link
Contributor

Rick-Anderson commented May 1, 2020

Add this to Catch-all section in Route template reference
and Migrate from ASP.NET Core 2.2 to 3.0

@rynowak Next time Can you create an issue from the doc page? That will connect the doc to the issue. Go to the bottom of the page and select This page .

image

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

Successfully merging a pull request may close this issue.

3 participants