Re-examining WebHostBuilderContext
Remember the WebHostBuilderContext
Kestrel configuration in the Program.cs
that we looked at in Chapter 4, Configuring and Customizing HTTPS with Kestrel? In that chapter, we saw that you should use user secrets to configure the certificate's password, as shown in the following code snippet:
public class Program { public static void Main(string[] args) { CreateHostBuilder(args).Build().Run(); } public static IHostBuilder CreateHostBuilder( string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { ...