Mid ASP.NET Core

Differences between terminal middleware vs non-terminal?

middleware

Type Description

Terminal Ends the pipeline. Doesn’t call next(). E.g., app.Run()

Non-Termi

nal

Calls next() and allows other middlewares to run after it.

E.g., app.Use()

Terminal middleware:

app.Run(async ctx => {

await ctx.Response.WriteAsync("This ends the pipeline");

});

More from ASP.NET Core Tutorial

All questions for this course