Chapter 5: Configuring WebHostBuilder

When reading Chapter 4, Configuring and Customizing HTTPS with Kestrel, you might have asked yourself a question:

How can I use user secrets to pass the password to the HTTPS configuration?

You might even be wondering whether you can fetch the configuration from within Program.cs.

In this chapter, we're going to answer these questions through the following topic:

  • Re-examining WebHostBuilderContext

The topic in this chapter refers to the hosting layer of the ASP.NET Core architecture:

Figure 5.1 – The ASP.NET Core architecture

Figure 5.1 – The ASP.NET Core architecture

Technical requirements

To follow the descriptions in this chapter, you will ...

Get Customizing ASP.NET Core 6.0 - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.