I've installed Visual Studio 2019 and uninstalled Visual Studio 2017.
Now if I start an ASP.NET (Core) site with https, it always say on Chrome:
This site can’t provide a secure connection
or on Edge
Can’t connect securely to this page
Chrome:
Edge:
The URLs are correct. This also the same http://localhost:56784/ (it redirects to https)
What I've tried:
I think the issue is introduced by:
The underlining issue looks like a wrong/old/not supported TLS version?
What can I do to diagnose/fix the problem?
Found a workaround solution : uninstall IIS Express and reinstall it. Now I can open visual studio, create a WebApplication MVC type, run it locally and my localhost with its port number can open properly.
This error typically indicates a problem with either your browser's configuration or the SSL certificate on your site (on localhost, this usually means you don't have one at all). Fixing it simply involves generating an SSL certificate for localhost using OpenSSL.
run the web project in debug mode on Visual studio 2019. Show activity on this post. Right click on the project, select Properties, 'Debug', check the checkbox "Enable SSL", that's it, worked with me by doing this
Kinsta.com uses an encrypted HTTPS connection. HTTPS offers major security advantages over HTTP, but it also comes with strict requirements to ensure compliance. One of them is the presence of a valid SSL certificate. The “This site can’t provide a secure connection” error indicates a problem with the SSL certificate.
Once you click on the Proceed to localhost (unsafe) tab, it will give you the response as shown in the image below. As shown in the above image, once you click on the Not Secure link, you will see that the certificate is invalid as shown below. The reason is that the certificate that Visual Studio installed automatically is not trusted.
To solve the above problem, what we need to do is, we need to place the certificate that visual studio has issued in the Trusted Root Certificates folder
Just as it did not work for @Nosnetrom
- repairing IIS 10.0 Express did not work for me either. As @Julian
mentioned my problem was caused by uninstalling VS 2017 as well.
This is what did not work for me:
This is what worked for me:
C:\Program Files (x86)\IIS Express\config\templates\PersonalWebServer\applicationhost.config
. I had to open that file in Notepad ran as an administrator otherwise I could not save these changes:
Repair of IIS Express fixed my problem:
For those who all the above methods didn't worked:
open a command prompt and then run:
dotnet dev-certs https --clean
and then:
dotnet dev-certs https --trust
None of the above solutions worked for me, Following steps worked for me.
Go to chrome or edge browser and type chrome://net-internals/#hsts
search for localhost in query domain, you will find lists of domain including localhost. Now delete the domain
Delete the domain by typing localhost
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With