Skip to Main Content
ASP.NET Core in Action, Second Edition
book

ASP.NET Core in Action, Second Edition

by Andrew Lock
May 2021
Intermediate to advanced content levelIntermediate to advanced
832 pages
25h 39m
English
Manning Publications
Content preview from ASP.NET Core in Action, Second Edition

3 Handling requests with the middleware pipeline

This chapter covers

  • What middleware is
  • Serving static files using middleware
  • Adding functionality using middleware
  • Combining middleware to form a pipeline
  • Handling exceptions and errors with middleware

In the previous chapter, you had a whistle-stop tour of a complete ASP.NET Core application to see how the components come together to create a web application. In this chapter, we’ll focus in on one small subsection: the middleware pipeline.

In ASP.NET Core, middleware are C# classes or functions that handle an HTTP request or response. They are chained together, with the output of one middleware acting as the input to the next middleware, to form a pipeline.

The middleware pipeline is one of ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ASP.NET Core in Action, Third Edition

ASP.NET Core in Action, Third Edition

Andrew Lock

Publisher Resources

ISBN: 9781617298301Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link