Hey everyone,
I randomly started encountering the following error while using docker to host my Ocelot gateway:
Failed to load the development https certificate at ‘/root/.aspnet/https/ContentGateway.pfx’.
The solution ended up being to clean out as many temp files as possible, especially the generated certs:
- Delete the following files: Delete the C:\Users{USER}\AppData\Roaming\ASP.NET\Https folder
- Clean the solution. Delete the bin and obj folders (I just did this for the gateway project)
- Restart visual studio/visual code
I’ll add an update if I can narrow down what caused the initial issue but for now this seems to work.
Thanks to the following links for the info:
– https://docs.microsoft.com/en-au/aspnet/core/security/enforcing-ssl?view=aspnetcore-3.1&tabs=visual-studio#trust-the-aspnet-core-https-development-certificate-on-windows-and-macos
– https://stackoverflow.com/q/52457514/522859