-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.feature-iisIncludes: IIS, ANCMIncludes: IIS, ANCM
Milestone
Description
In IIS in-proc, if a developer creates and disposes an extra host for some reason before creating the real host they intend to start, the disposal of the first host puts IIS in a faulted state that the second one can't recover from. This results in the app returning 503s after the first few requests.
We should see if it's feasible to detect this state when starting the second host and at least produce a good error. e.g. "IIS can't be started because something in the process has already shut it down. Remove any extra Hosts."
public static void Main(string[] args)
{
WebHost.CreateDefaultBuilder(args).UseStartup<EnvironmentStartup>().Build()
.Dispose();
CreateHostBuilder(args, EnvironmentStartup.Configuration).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args, IConfiguration config)
{
return Host.CreateDefaultBuilder(args).ConfigureAppConfiguration(delegate(HostBuilderContext hostingContext, IConfigurationBuilder config)
{
[truncated]
}).ConfigureWebHostDefaults(delegate(IWebHostBuilder webBuilder)
{
if (config.GetValue<bool>("UseIISHosting"))
{
webBuilder.UseIIS();
}
else
{
webBuilder.UseKestrel();
}
webBuilder.UseStartup<Startup>();
});
}
Metadata
Metadata
Assignees
Labels
area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.feature-iisIncludes: IIS, ANCMIncludes: IIS, ANCM