dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.64k stars 25.28k forks source link

UseWhen works instead of Mapwhen #10520

Open ashishonce opened 5 years ago

ashishonce commented 5 years ago

regarding this line

app.MapWhen(
        context => context.Request.Path.ToString().EndsWith(".report"),
        appBranch => {
            // ... optionally add more middleware to this branch
            appBranch.UseMyHandler();
        });

while creating a list of multiple middlewares. app.MapWhen is not forwarding the request to further pipeline, instead app.UseWhen is working properly

Edit by @Rick-Anderson
2.5K PV


Document Details

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

Rick-Anderson commented 5 years ago

@mperdeck please review

Rick-Anderson commented 1 year ago

Have @Tratcher review after .NET 8 RTW