ASP.NET: Middleware
Learn how ASP.NET apps process requests and generate responses using middleware
StartKey Concepts
Review core concepts you need to learn to master this subject
Understanding ASP.NET middleware
Adding ASP.NET Middleware Components
Ordering ASP.NET Middleware
Accessing Built-in ASP.NET Components
Adding custom middleware components
Adding terminal ASP.NET middleware
Understanding ASP.NET Nested Structure
Understanding ASP.NET Developer Exception Pages
Understanding ASP.NET middleware
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.
- 1Web 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…
- 2We 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…
- 3We 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 …
- 4We 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…
- 5We 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…
- 6We 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. …
- 7We 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…
- 8In 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…
- 9Within 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…
- 10In 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
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory