If you want to save the password for the Https certificate, finally, in the User Secrets section, add the following lines to the appropriate sections in the Main of Program.cs section:
var config = new ConfigurationBuilder() .AddUserSecrets("your-user-secrets-id") //usually in project.json var host = new WebHostBuilder() .UseConfiguration(config) .UseKestrel(options=> { options.UseHttps("certificate.pfx", config["your-user-secrets-id"]); })
User secrets must be passed directly, because the project.json configuration for "userSecretsId" is not yet available at this point.
source share