Key Concepts

Review core concepts you need to learn to master this subject

Understanding ASP.NET middleware

Web applications use a series of components to route each HTTP request to its destination and then return an appropriate response to the user. This series of components is organized in a pipeline which is collectively known as middleware.

Introduction To ASP.NET Middleware
Lesson 1 of 2
  1. 1
    Web applications are everywhere. We use them for shopping, connecting with friends and family, and even for learning. Every time we perform an action in a web application, we are generating a reque…
  2. 2
    We know web applications need middleware to be able to respond to user requests. We also know middleware is made up of a series of components. Now, let’s dive deeper into the technical implementati…
  3. 3
    We know middleware is made up of delegates and these delegates are called in sequence, but let’s discuss how that sequence is determined. When we create a new web application in Visual Studio, the …
  4. 4
    We know CreateHostBuilder() is important because it’s responsible for certain configuration settings for our application, but now, let’s take some time to dive into the UseStartup() method, which g…
  5. 5
    We know components are added to the request pipeline using Startup.Configure(). We understand that the middleware request pipeline is a sequence in which each delegate performs its processing and t…
  6. 6
    We know how middleware components are added to the request pipeline, but how do we know which methods are available for use? We can find this answer by examining the IApplicationBuilder interface. …
  7. 7
    We know we can use IApplicationBuilder to add built-in middleware components to the request pipeline. We also know there’s an entire list of UseX() methods available via the interface. Although the…
  8. 8
    In the previous exercise, we mentioned that each component performs its processing and then has to choose between passing the request to the next delegate in the sequence or short-circuiting the pi…
  9. 9
    Within the lambda expression passed to app.Use() and app.Run(), we can add a next parameter. This allows us to call the “next” middleware in the pipeline. For example, this middleware does nothing…
  10. 10
    In this lesson we talked about the prevalent use of web applications and how our actions in a web application correspond to sending requests. We detailed how middleware is responsible for processin…

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo