I\'m setting up the first site in IIS on Windows Server 2016 Standard.
This is a NET Core 2.2
application. I cannot get the site to show.
I am getting th
I fixed this here Asp.Net Core Fails To Load - you need to specify that the program uses an in process or out of process model.
I changed my CreateWebHostBuilder to:
public static IWebHostBuilder CreateWebHostBuilder(string[] args)
{
var env = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT");
var builder = WebHost.CreateDefaultBuilder(args);
if (env == EnvironmentName.Staging || env == EnvironmentName.Production)
builder.UseIIS();
builder.UseStartup();
return builder;
}
PS. I set ASPNETCORE_ENVIRONMENT
in my .pubxml deployment profile by adding:
Staging