ASP.NET 5 Configuration – Settings Classes

In earlier Configuration examples, we used IConfigurationRoot to access settings with a string key, which returned a string value.  In the following example, we’ll see how to configure typed access to settings. The code snippets shown here are from the command line example project. You can find both the command line project and a Visual Studio 2015 […]

ASP.NET 5 Configuration – Environment Specific Settings

ASP.NET 5 lets us use an environment variable named ASPNET_ENV to specify the environment that an application is running in (the variable can also be named Hosting:Environment). You can use any value for the environment name, but “Development”, “Staging”, and “Production” are used by convention. Note: In earlier releases of ASP.NET 5, the environment variable name […]

ASP.NET 5 Configuration – Using the Built-In Providers

In older versions of ASP.NET, configuration information was stored in XML files, with a machine.config file for machine-wide settings and one or more web.config files for ASP.NET site settings.  ASP.NET 5 introduces a new configuration system, allowing configuration information to come from files (JSON, XML, INI), environment variables, or custom configuration providers. In this post, we’ll […]