Configure SSL certificate path for all projects in a .NET solution (Kestrel server)

Viewed 68

I have a localhost.pfx which I need to be accessed by all projects in solution. At the moment, I've tried

listenOptions.UseHttps("localhost.pfx", "password");

But this expects the .pfx file to be in all project folders

e.g. Source\Project1\localhost.pfx

I just want to have a single localhost.pfx file in the route Source folder used by all projects:

Source\localhost.pfx

Is this possible in the appsettings.json?

I can't really use the certificate store either because I need to containerise the app so I just want to have a pfx file I can put in the container and use for now.

0 Answers
Related