I am currently using ASP.NET Core 2.x, and I used to be able to get Kestrel to to use HTTPS / SSL by simply putting it in the UseUrls()
method like so:
var host = new WebHostBuilder() .UseUrls("http://localhost", "https://111.111.111.111") .UseKestrel() .Build();
But now I get the exception:
System.InvalidOperationException: HTTPS endpoints can only be configured using KestrelServerOptions.Listen().
How do I configure Kestrel to use SSL in ASP.NET Core 2.x?