Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1638

Visual Studio ASP.NET Docker HTTPs certificate

$
0
0

I'm running Visual Studio 2022, and have Docker Desktop installed (Linux Containers).

When I go file -> new project -> ASP.NET Core Web App and have Configure for HTTPS ticked, Enable Docker ticked and Docker OS as Linux.And then try and Debug the a application with Docker profile selected.Debug settings

I get the following error:

Error

It says to look at the container tools output but there is nothing that says any error.

Looking at other things people suggest running:

dotnet dev-certs https --clean

dotnet dev-certs https --trust

Which I have done and can see the localhost certificate in the Cert store (Personal & Trusted). But it still results in exactly the same error as above.

I see suggestions to export the certificate via:

dotnet dev-certs https -ep %APPDATA%\ASP.NET\Https\WebApplication1.pfx -p 2e20670b-2656-4d5f-8e5b-b6d782b20113

With 2e20670b-2656-4d5f-8e5b-b6d782b20113 being the UserSecretsId of the project.And I can see the WebApplication1.pfx certificate, a strange thing is that everyone refers to the UserSecrets file having an entry for "Kestrel:Certificates:Development:Password"

But mine is empty. I've tried adding an entry:

{"Kestrel:Certificates:Development:Password": "2e20670b-2656-4d5f-8e5b-b6d782b20113"}

But it still results in the same error.

Please help as I have been going insane with this for the past 4 days.


Viewing all articles
Browse latest Browse all 1638


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>