Esempio n. 1
0
        public static IWebHostBuilder CompleteHostConfiguration(this IWebHostBuilder builder, ISharedConfiguration SharedConfiguration)
        {
            builder.UseSetting(WebHostDefaults.ApplicationKey, SharedConfiguration.GetValue("Hosting:appKey"))
            .CaptureStartupErrors(true)
            .UseSetting(WebHostDefaults.DetailedErrorsKey, "true")
            .UseSetting("https_port", SharedConfiguration.GetValue("Hosting:httpsPort"))
            .PreferHostingUrls(true)
            .UseUrls(SharedConfiguration.GetStringArray("Hosting:useUrls"))
            .UseHttpSys(options =>
            {
                UrlPrefixCollection urlPrefixesColl = options.UrlPrefixes;
                AddUrlPrefixes(SharedConfiguration, ref urlPrefixesColl);
            });

            return(builder);
        }