Giter VIP home page Giter VIP logo

asp.net-4.6-configuration-demo's Introduction

ASP.NET Core (ASP.NET 5) like configuration in regular .NET applications

Demo application to show how to load config values in ASP.NET 4.6 similar to how it is done in ASP.NET Core.

This is a demo project in connection to the blog post ASP.NET 5 like configuration in regular .NET applications.

In this sample project I provide 3 different configuration sources:

  • WebConfig
  • Text file (similar like an ini file)
  • Environment Variables

I demo two examples of composing the configuration object. The first option uses a simple Decorator pattern and in the second option composes the configuration via a fluent builder pattern (which uses the Decorator under the covers).

You can test this by running the application and removing/adding configuration sources as you like.

Please be aware that if you set an environment variable for the GreetingText that you might have to restart VisualStudio in order for the parent process to pick up environment variable changes.

If you have any further questions feel free to reach out to me.

asp.net-4.6-configuration-demo's People

Contributors

dustinmoris avatar

Watchers

James Cloos avatar Matt Perry avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.