Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS Express self-signed certificate not trusted

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

like image 421
Sander Declerck Avatar asked Jan 25 '26 02:01

Sander Declerck


2 Answers

Try the following on your command prompt:

dotnet dev-certs https --trust
like image 155
Chris Claude Avatar answered Jan 26 '26 15:01

Chris Claude


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
like image 44
zax Avatar answered Jan 26 '26 14:01

zax