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 => Â Â Â Â Â Â Â Â Â Â Â Â { Â Â Â Â Â ...