• 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.

0 Years in
Operation
0 Loyal
Clients
0 Successful
Projects

Words from our clients

 

Tell Us About Your Project

We’ve done lot’s of work, Let’s Check some from here