Author : MD TAREQ HASSAN | Updated : 2020/05/25

ASP.Net Core

Request response pipeline

ASP.Net core - Request response pipeline

Middleware pipeline

ASP.Net core - Middleware pipeline

Flow:

Startup.cs

public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        //...
    }

    public void Configure(IApplicationBuilder app, IHostingEnvironment env)
    {
        app.Use(async (context, next) =>
        {
            await context.Response.WriteAsync("");
        });

        app.Run(async (context) =>
        {
            await context.Response.WriteAsync("");
        });
    }
}

App execution

ASP.Net core - App execution