public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.ConfigureKestrel(serverOptions =>
{
//Set properties and call methods on options
serverOptions.Listen(IPAddress.Any, 44376, listenOptions =>
{
listenOptions.Protocols = HttpProtocols.Http2;
listenOptions.UseHttps("C:\\Users\\IT04\\source\\Workspaces\\EsoMenuForLinux\\EsoMenuForLinux\\bin\\Debug\\localhosstssl.pfx",
"123");
});
serverOptions.ConfigureHttpsDefaults(listenOptions =>
{
listenOptions.SslProtocols = SslProtocols.Tls12;
});
})
.UseStartup<Startup>();
});
}
this is code. i set tls12 only ,but it don't work ! the client still requests in tls1.