Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Customizing ASP.NET Core 5.0
Customizing ASP.NET Core 5.0

Customizing ASP.NET Core 5.0: Turn the right screws in ASP.NET Core to get the most out of the framework

eBook
$23.99 $26.99
Paperback
$38.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Customizing ASP.NET Core 5.0

Chapter 2: Customizing App Configuration

This second chapter is about application configuration, how to use it, and how to customize the ASP.NET configuration to employ different ways to configure your app. Perhaps you already have an existing XML configuration, or want to share a YAML configuration file over different kinds of applications. Sometimes, it also makes sense to read configuration values out of a database.

In this chapter, we will be covering the following topics:

  • Configuring the configuration
  • Using typed configurations
  • Configuration using INI files
  • Configuration providers

The topics in this chapter refer to the hosting layer of the ASP.NET Core architecture:

Figure 2.1 – ASP.NET Core architecture

Figure 2.1 – ASP.NET Core architecture

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Customize the default behavior of ASP.NET Core to get the most out of the framework
  • Enhance the app configuration, change the default dependency injection, and build your own tag helpers
  • Discover best practices for configuring ASP.NET Core, from user interface design to hosting it on platforms

Description

ASP.NET Core is the most powerful Microsoft web framework. Although it’s full of rich features, sometimes the default configurations can be a bottleneck and need to be customized to suit the nature and scale of your app. If you’re an intermediate-level .NET developer who wants to extend .NET Core to multiple use cases, it's important to customize these features so that the framework works for you effectively. Customizing ASP.NET Core 5.0 covers core features that can be customized for developing optimized apps. The customization techniques are also updated to work with the latest .NET 5 framework. You’ll learn essential concepts relating to optimizing the framework such as configuration, dependency injection, routing, action filters, and more. As you progress, you’ll be able to create custom solutions that meet the needs of your use case with ASP.NET Core. Later chapters will cover expert techniques and best practices for using the framework for your app development needs, from UI design to hosting. Finally, you’ll focus on the new endpoint routing in ASP.NET Core to build custom endpoints and add third-party endpoints to your web apps for processing requests faster. By the end of this application development book, you’ll have the skills you need to be able to customize ASP.NET Core to develop robust optimized apps.

Who is this book for?

This .NET 5 book is for .NET developers who need to change the default behaviors of the framework to help improve the performance of their applications. Intermediate-level knowledge of ASP.NET Core and C# is required before getting started with the book.

What you will learn

  • Explore various application configurations and providers in ASP.NET Core 5
  • Understand dependency injection in .NET and learn how to add third-party DI containers
  • Discover the concept of middleware and write your own middleware for ASP.NET Core apps
  • Create various API output formats in your API-driven projects
  • Get familiar with different hosting models for your ASP.NET Core app
  • Develop custom routing endpoints and add third-party endpoints
  • Configure WebHostBuilder effectively for your web applications

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jan 28, 2021
Length: 160 pages
Edition : 1st
Language : English
ISBN-13 : 9781801079303
Vendor :
Microsoft
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Jan 28, 2021
Length: 160 pages
Edition : 1st
Language : English
ISBN-13 : 9781801079303
Vendor :
Microsoft
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 162.97
Customizing ASP.NET Core 5.0
$38.99
ASP.NET Core 5 Secure Coding Cookbook
$43.99
C# 10 and .NET 6 – Modern Cross-Platform Development
$79.99
Total $ 162.97 Stars icon

Table of Contents

14 Chapters
Chapter 1: Customizing Logging Chevron down icon Chevron up icon
Chapter 2: Customizing App Configuration Chevron down icon Chevron up icon
Chapter 3: Customizing Dependency Injection Chevron down icon Chevron up icon
Chapter 4: Configuring and Customizing HTTPS with Kestrel Chevron down icon Chevron up icon
Chapter 5: Using IHostedService and BackgroundService Chevron down icon Chevron up icon
Chapter 6: Writing Custom Middleware Chevron down icon Chevron up icon
Chapter 7: Content Negotiation Using a Custom OutputFormatter Chevron down icon Chevron up icon
Chapter 8: Managing Inputs with Custom ModelBinders Chevron down icon Chevron up icon
Chapter 9: Creating a Custom ActionFilter Chevron down icon Chevron up icon
Chapter 10: Creating Custom TagHelpers Chevron down icon Chevron up icon
Chapter 11: Configuring WebHostBuilder Chevron down icon Chevron up icon
Chapter 12: Using Different Hosting Models Chevron down icon Chevron up icon
Chapter 13: Working with Endpoint Routing Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.1
(8 Ratings)
5 star 50%
4 star 37.5%
3 star 0%
2 star 0%
1 star 12.5%
Filter icon Filter
Top Reviews

Filter reviews by




Ricardo Jorge Melo Jóia Mar 07, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is not a book for beginners, the author assumes you already know at least the basics about ASP.NET Core and you're looking to, as the book name suggests, customize the default behavior.One thing that I like particularly is that each chapter is self-contained, by that, I mean that the author explains how to start a new project and implement the particular example from scratch, often, other authors use the same solution across the whole book, and reuse snippets from another chapter, if you're not following along and you want to test just something you might get into a situation where you can't implement the given example due to some part of the solution is missing, anyway, that won't happen if you try to implement any of this book's examples.Another thing is that the author doesn't assume his way is the best, and not only suggests you look for other ways to implement that solution but also refers the readers to blog posts and other resources so you can learn a different perspective and decide which solution is the best for your case.The author explains what's the scope for each chapter and tries to give some examples of use-cases where such customization might be used or important, such as, using a 3rd Party Dependency Injection Container, customizing HTTPS with Kestrel, creating custom ActionFilters, TagHelpers, etc...This book is what I classify as a "cookbook" and definitely one book to have at hand to use in the real world.
Amazon Verified review Amazon
Robert Frey Apr 25, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I really love this book. It has several real world approaches to improving code and writing better software systems; especially if you are a seasoned .Net developer who wants to brush up on enterprise coding practices. I would recommend this to anyone looking to add to their skill set in .Net while moving to .Net 5 platform.
Amazon Verified review Amazon
Ron Clabo Apr 27, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I’d especially recommend this book as a developer’s 2nd book on ASP.NET Core once they have read through an “I’m starting from scratch” beginner book. The content in this book will build on that intro.Such a developer will find the following customizations covered by this book particularly useful: logging, configuration, dependency injection, writing middleware, model binding, ActionFilters, TagHelpers and Endpoint Routing. While some of those maybe covered in an intro book, it’s helpful having a 2nd resource on these topics as they from the backbone for how ASP.NET Core works.Many will find it nice that this book doesn’t spend a lot of time wading through theory, but rather gets you to usable code very quickly. And the book even covers a few more advanced topics like IHostedService , BackgroundService and hosting on NGINX or Apache on Linux..NET Core opens up so many new doors and this book will help you walk through them.
Amazon Verified review Amazon
Binit Datta Apr 25, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The title of the book got me interested. While there are lots of books teaching the .NET Core 3/5, a Productionzed Microservices has different requirements. I would not like to choose the .NET 5 Framework for a specific application/set of Microservices and then dive into the extensive documentation to learn how to meet these production environment requirements like configuring logging, telling the Microservice how to retrieve configuration, etc. Learning Curve and shortening the learning curve i.e. 160 pages is absolutely critical for me.On the configuration requirements alone, while .NET 5 does a commendable job that matches other popular Microservices frameworks like SpringBoot, there is hardly a one size fits all. Different companies may have different standards, central repositories, and other platforms where configuration is hosted. Besides, a production environment will need HTTPS, and learning how to do that with Kestrel in chapter 4 is a critical value addition. Running software in the background, writing custom middleware, customizing different formatters for different outputs, binding objects with different inputs, writing custom tag helper are great lessons. Finally, understanding the varieties of .NET Core 5.0 deployment models in chapter 12 and learning how to route requests in chapter 13 are the icing on the cake.The best part is its size total of 161 pages, teaching so many great things transforming a .NET Core developer from a laptop/desktop developer to a production-focused developer.Highly recommended, and I am using it for my teams as well!Thanks,Binit
Amazon Verified review Amazon
Adwait Ullal Apr 22, 2021
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
The book, Customizing ASP.NET Core 5.0, deals with tweaking the knobs at various layers:- WebAPI- Razor Pages- MVC/SignalR/gRPC/Blazor/etc.- Routing- Middleware- Hostsuch customizing logging, dependency injection or writing custom middleware.Each chapter indicates what layer is that particular tweak related to and goes in-depth the pros and cons of the tweak.I enjoyed this comprehensive book and would have it as a handy companion during design and performance tuning sessions.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.