Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1635

How can I use HTTPS / SSL with Kestrel in ASP.NET Core 2.x?

$
0
0

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?


Viewing all articles
Browse latest Browse all 1635

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>