Load certificate in Kestrel

To support TLS 1.3 in the built-in Kestrel server for an ASP.NET app like PowerServer Web APIs, you will need to specify the SSL certificate in the PowerServer C# solution > ServerAPIs project > Program.cs:

public static IHostBuilder CreateHostBuilder(string[] args)
        {
            var hostBuilder = Host.CreateDefaultBuilder(args);

            // Sets the PowerServer logging provider
            hostBuilder.ConfigurePowerServerLogging();

            // Sets the PowerServer host
            // Handles the injection of configuration file, Web host, and PowerServer key services
            hostBuilder.ConfigurePowerServerHostDefaults(webBuilder =>
            {
                webBuilder.ConfigureKestrel(serversOptions =>
                {
                    serversOptions.AddServerHeader = false;
                    serversOptions.ConfigureEndpointDefaults(ListenOptions =>
                    {                
                        //uses http2 (not a must-have). If http2 is not supported, will get prompts.
                        //ListenOptions.Protocols = Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols.Http2;
                        //loads the certificate (a must-have)
                        ListenOptions.UseHttps("server.pfx","appeon1234", adapterOptions =>
                        {
                            //uses tls 1.3 (not a must-have). If tls 1.3 is not supported, will get prompts.
                            //adapterOptions.SslProtocols = System.Security.Authentication.SslProtocols.Tls13;
                        });
                    });
                });

                webBuilder.UseStartup<Startup>();
                
            });

            return hostBuilder;
        }