0

I'm using the preview tooling for ASP.NET Core and VS 2015 that was released in Dec timeframe.

I've followed numerous online examples with how to enable SSL in Kestrel. None of them worked.

So I tried an option in project called "Enable SSL" and it seems to set a port for me, and works from local host, but doesn't seem to work from elsewhere.

I've also tried .UseKestrel() I have option.UseHttps("ssl.pfx", "password")

Below that I have UseUrls, but it doesn't seem to bind correctly to the ports because my SSL requests. When I try to issue SSL requests it times out. I used netstat and it seems like there is no port opened for my specified SSL port.

1) How do I use UseUrls? I need both localhost and remote machine access 2) How do I configure IIS express to allow the https calls?

If anyone has a good reliable way to set this up for VS 2015 in an ASP.NET Core project I would really appreciate it!

Thanks,

James

James Scott
  • 990
  • 2
  • 10
  • 29
  • I should add that the current way I'm doing it is in .UseKestrel() I have option.UseHttps("ssl.pfx", "password") – James Scott Mar 31 '17 at 18:23

1 Answers1

0

You're not saying what you have tried so far, so maybe you've tried that already, but you need to:

  • have a valid certificate that your server will be able to provide to the client
  • install the nuget package: Microsoft.AspNetCore.Server.Kestrel.Https
  • change your configure sequence so that it uses Kestrel Https app.UseKestrelHttps(certificate);
  • change the url Kestrel is listening to one starting by https://

I used this article a few months back on VS2015: https://www.thesslstore.com/blog/implement-ssl-kestrel-asp-net-core/ I worked fine for me, but maybe there are a few things to adapt with the latest version.

Daboul
  • 2,635
  • 1
  • 16
  • 29
  • 1
    Thanks for reaching out @Daboul. Unfortunately the article you recommend is a little old. Changes have been made. I've seen some of the updated changes and I'm trying to piece them together but have been unsuccessful so far. – James Scott Mar 31 '17 at 18:32