Validate scopes in Development environment in CreateDefaultBuilder (#61)

This commit is contained in:
Pavel Krymets 2017-04-27 08:43:40 -07:00 committed by GitHub
parent a7abb0d78f
commit d4f39bf56b
1 changed files with 4 additions and 0 deletions

View File

@ -181,6 +181,10 @@ namespace Microsoft.AspNetCore
logging.AddDebug();
})
.UseIISIntegration()
.UseDefaultServiceProvider((context, options) =>
{
options.ValidateScopes = context.HostingEnvironment.IsDevelopment();
})
.ConfigureServices(services =>
{
services.AddSingleton<IStartupFilter, WebHostStartupFilter>();