Failed to Authenticate HTTPS connection when attempting GET from WebAPI
The most straight forward solution I found for this problem was to remove the cert and add it with the trust flag.
dotnet dev-certs https --clean
dotnet dev-certs https --trust
PS. I know this is old but I am just going to leave this here for someone that might stumble to this issue.
I had the same problem. After many hours of checking everything possible and even some impossible stuff, I managed to trace it back to wrongly generated SSL certificate.
I was creating mine according to this manual: How to: Create Your Own Test Certificate.
The certificate is generated using this command:
makecert -sv yourprivatekeyfile.pvk -n "cert name" yourcertfile.cer -r
where if -r
is omitted, described error occurs.
Then pfx
must be generated according to the manual. If one uses just cer
, Kestrel
will not start successfully.
I solved it by generating a new SSL certificate.