Skip to content

Instantly share code, notes, and snippets.


Babak Naffas babakontheweb

View GitHub Profile
babakontheweb / NoINotifyCreateWebHostBuilder_dotnetcore-2.x
Last active Feb 13, 2020
A copy of Microsoft's WebHost.CreateDefaultBuilder but with IIS and FileWatcher dependencies removed for Linux environments. See
View NoINotifyCreateWebHostBuilder_dotnetcore-2.x
/// <summary>
/// Initializes a new instance of the <see cref="WebHostBuilder"/> class with pre-configured defaults.
/// </summary>
/// <remarks>
/// The following defaults are applied to the returned <see cref="WebHostBuilder"/>:
/// use Kestrel as the web server and configure it using the application's configuration providers,
/// set the <see cref="IHostingEnvironment.ContentRootPath"/> to the result of <see cref="Directory.GetCurrentDirectory()"/>,
/// load <see cref="IConfiguration"/> from 'appsettings.json',
/// load <see cref="IConfiguration"/> from User Secrets when <see cref="IHostingEnvironment.EnvironmentName"/> is 'Development' using the entry assembly,
/// load <see cref="IConfiguration"/> from environment variables,
You can’t perform that action at this time.