'This site can’t provide a secure connection' Enable SSL configure for Visual Studio 2019

2.6k Views Asked by At

As i have this project which has already SSL Enabled after pressing F4 here is a snapshot below.
Enable SSL

As i update it with https://localhost:58065/ on my Web Project Url it gives me this issue when the project runs.
enter image description here

As i have followed plenty of websites for help but nothing worked for me especially when i exported and imported and certificate file. Even if i change the http://localhost:58065/ to something like this http://localhost:58061/without SSL and https://localhost:58065/ for SSL it still shows the same issue.

1

There are 1 best solutions below

3
On BEST ANSWER

try another port, like this url

https://localhost:44337/

Me too had problem with 58061.

Try one of these:

44337,44338,44339, ..... 44399

The probable cause is that 44300-44399 are preconfigured by IIS Express installer with a test certificate, while other ports might not.