IIS Express self-signed certificate not trusted
Asked Answered
F

3

12

When debugging a new .net core website (file => new project) in Visual Studio 2017, I am prompted with the question if I wish to trust the self-signed IIS express certificate:

However, after clicking "Yes", I don't get the security warning to add the certificate. Instead, I am redirected to the browser directly, and get a security warning:

I am running Windows 10

Does anyone know how to resolve this issue?

Edit:

According to this guide, I should get a security warning after clicking "Yes". But that window is not shown. (I know, that guide is about VS2013).

Facture answered 4/11, 2017 at 9:41 Comment(6)
Can you provide a translation in English for that error message? Most browsers can allow you to bypass the certificate error. (ex: Chrome)Tremulous
Ok, I edited my post. I simply did not notice it was in my language.Facture
@Tremulous I know I can click "Advanced" and then "Proceed" (as I am doing it now). However, in the long run, I really wish I could trust the IIS Express self-signed certificate.Facture
I restarted Edge and then it worked (no security warning).Thoughtout
This blog post sorted it for me steffbeckers.eu/blog/… on a legacy iisexpress project, via the linked gist gist.github.com/camieleggermont/…Shimberg
RESTART BROWSER is the answer. Thanks John H!Tremml
H
18

Try the following on your command prompt:

dotnet dev-certs https --trust
Heck answered 22/3, 2021 at 14:32 Comment(2)
The only other solution I had found was to uninstall Visual Studio and IIS Express which I didn't consider an option...This solution just saved my dayOutspread
I had to restart Visual Studio and/or my browser (Edge) to get this to take effect. Not sure which of these were required as both were restarted, but this solution worked fine after the restarts.Aixlachapelle
K
0

https://blog.lextudio.com/why-chrome-says-iis-express-https-is-not-secure-and-how-to-resolve-that-d906a183f0?source=linkShare-509776cef47e-1509798792

You are not installing the latest IIS Express, and the certificate is not trusted by Chrome.

Either you create another certificate as I hinted in the blog post or you install latest Visual Studio 2017 with IIS Express.

Kaleighkalends answered 4/11, 2017 at 12:35 Comment(0)
H
0

My dev site worked in Chrome and Firefox, but not in Edge. The only fix that worked for me was to execute the following:

c:\Program Files (x86)\IIS Express>IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:<port>/ -UseSelfSigned
Hoodlum answered 7/8, 2024 at 17:14 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.