We Care Through What We Share
  • Yesterday I ran into a very interesting issue, I am running my local asp.net 2.1 application with HSTS, but it only start with HTTP port 5000. Even with HSTS on, Kestrel is not picking 5001 for SSL.

    Application was not showing any error or any warning. First I thought it is launchSettings.json. But changing it doesn't work.

    Then I tried -

    dotnet run --server.urls=https://127.0.0.1:5001

    This time dotnet showed error that default SSL certificate is missing.

    Fix is simple:

    dotnet dev-certs https

    This command will install default certificate with localhost and now your application will start for both 5000 and 5001 ports.

Words From Our Clients

0Years In Operation
0Loyal Clients
0Successful Projects

Tell Us About Your Project