以下のASP.NET Core Mainメソッドでは、ホスティング環境をどのようにして判断することができますか?HTTPS用に異なる証明書ファイルを切り替えるにはどうすればよいですか? KestrelとUseHttpsを設定する際のホスティング環境の決定
public sealed class Program
{
public static void Main(string[] args)
{
new WebHostBuilder()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseKestrel(
options =>
{
if ([Development Hosting Environment])
{
options.UseHttps("DevelopmentCertificate.pfx");
}
else
{
options.UseHttps("ProductionCertificate.pfx");
}
})
.UseIISIntegration()
.UseStartup<Startup>()
.Build()
.Run();
}
}
私はあなたがそれを設定メソッド – Alexan