webHostBuilder = webHostBuilder.UseKestrel(options =>
{
options.Listen(IPAddress.Loopback, 4431, listenOptions =>
{
listenOptions.NoDelay = true;
listenOptions.UseHttps(new Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionAdapterOptions()
{
SslProtocols = SslProtocols.Tls,
CheckCertificateRevocation = false,
ClientCertificateMode = ClientCertificateMode.AllowCertificate,
ServerCertificate = new System.Security.Cryptography.X509Certificates.X509Certificate2(@"local.pfx", "intel@123")
});
});
})