Configuration ConfigurationManager

NuGet packageOwin.Framework.Configuration.ConfigurationManager
GitHub sourceOwinFramework.Configuration.ConfigurationManager

Home |  Readme

Implements IConfiguration using the .Net ConfigurationManager class. This allows you to configure the OWIN Framework in the web.config file

The Microsoft ConfigurationManager is extremely inflexible which means that when you configure the 'path' of the configuration data for your middleware this must be the name of a custom section in the config file.

The MicrosoftConfigurationManager requires each custom section to be backed by a class that conforms to strict patterns. These classes are very onerous to write so this framework does not require middleware authors to write them, and this means that it falls to your application to do this. Additionally the class that backs the custom section will not be the class that the middleware component is expecting to contain its configuration options, so this implementation uses AutoMapper to map from the custom section class to the middleware configuration class. Your application must configure AutoMapperto perform this mapping.

If all of this sounds like too much trouble then consider using another more flexible configuration mechanism (such as Urchin).

The Microsoft ConfigurationManager does not support dynamic reconfiguration, so if you use this configuration mechanism you will have to restart your website for configuration changes to be effective.

Related Projects