I'm using Windows Subsystem for Linux (Ubuntu) to host my ASP.NET Core web app. It has generated its own HTTPS self-signed cert. How do I configure my Windows cert store to trust that cert so that my Windows browser will navigate to it and trust it?
Note I've tried the command above, but it only trusts the Windows-generated cert. I need Windows to trust the Linux cert.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
This helped out. I followed the instructions to export my Windows-generated cert:
dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\aspnetapp.pfx -p crypticpassword
Then in my WSL window I ran:
ASPNETCORE_Kestrel__Certificates__Default__Password="crypticpassword" ASPNETCORE_Kestrel__Certificates__Default__Path=/mnt/c/Users/andarno/.aspnet/https/aspnetapp.pfx dotnet watch run
That effectively set the environment variables so that linux would use the Windows generated-and-trusted cert. Then my Windows browser was happy to access it. :)
@guardrex where is the right place to surface this info? I'm thinking in another doc, but link to it here.
@scottaddie isn't this related to #3310 ?
@Rick-Anderson I think so. Is there anything we want to change in the get started page? If not, I'll address it at the linked issue.
Make sure this page has a link showing how to set it up a cert for Ubuntu