From the course: Deploying ASP.NET Core Applications

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Configure Kestrel as an edge server

Configure Kestrel as an edge server

From the course: Deploying ASP.NET Core Applications

Start my 1-month free trial

Configure Kestrel as an edge server

- [Instructor] For applications that use Kestrel as an edge server, you can add some options to Kestrel to give it your own HTTPS certificate. In the Program.cs file, find the area that says UseStartup, and then underneath that, say .UseKestrel in order to pass some options to Kestrel. We'll say options, and inside of here, we'll do options.Listen, which tells it to listen on a local port. We'll have to give it IPAddress.Loopback. We'll say to listen to port 8088. And then one more set of options here. We'll say listenOptions and listionOptions.UseHttps. This is where you can pass an HTTPS certificate file that you have stored on disk. So, for example, we might say testcertificate.pfx, and if there's a password to unlock the certificate file, we'll give that here. Creating the certificate itself is outside the scope of this video, but you can get certificates for HTTPS for free from Let's Encrypt at letsencrypt.org. With this configuration in place, Kestrel will use the certificate…

Contents