While working on one of my projects that had been working perfectly fine with HTTPS in Docker I had made some changes to the project file and removed a couple of entries one of which was the <UserSecretsId></UserSecretsId> from the file. I never thought much of it at the time. Later I wanted to run the project and I received the following dialog box.
I thought that was a strange dialog box to receive as I didn’t think that I had made any changes that would cause this issue to come up.
Upon doing a google search to see if I could come up with a resolution to the problem I came upon a bug report for a Docker issue that matched what I was having the issue with.
It talked about some other possible resolutions to my issue I tried a few but still had the same issue. It also linked to another bug issue which was similar to what I was experiencing.
This more closely matched what I was experiencing and stated about it could be the <UserSecretsId></UserSecretsId> in the project file causing the issue. I placed that back in and my Docker containers started working again.
As an experiment I removed it and received a different error this time
Message=Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found.
To generate a developer certificate run 'dotnet dev-certs https'. To trust the certificate (Windows and macOS only) run 'dotnet dev-certs https --trust'.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.
At which point I put back the <UserSecretsId></UserSecretsId> in my project file and continued working. I thought I would post this and hopefully help someone else having the same issue.