In a previous lesson, we discussed the basics of middleware. We examined how the middleware components are added in the Startup.Configure() method and how the order in which they are called from the Configure()method determines the order in which they are added to the pipeline.

The purpose of the IApplicationBuilder interface is to provide tools used to configure the request pipeline. The IApplicationBuilder interface delivers the built-in middleware components. The components are accessible via methods in the interface and they take the format ‘UseX()’ with X describing the action performed by the method. For example, UseAuthorization() adds an authorization middleware component to the application.


Review the UseX() methods in the example. We’ll cover every method in this code. For now, we just need to understand that each of these components help create the middleware pipeline and ultimately affect the HTTP response sent back to the user.

View ASP.NET middleware documentation to see examples and a full-list of available built-in middleware components.

Sign up to start coding

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?