Skip to main content

Posts

Showing posts with the label section

Custom configuration in Web.config

Almost all projects have come configuration which is mostly unique and absolutely custom. That configuration allow to customize some application behaviors, settings and switching some parts of implementation. In Microsoft .NET Framework configuration can be stored in two types of files: *.config - XML based file which differ depending on project type. In web application such ASP.NET or WCF we working with Web.config file and in desktop application use App.config . *. setting - deprecated type of file which allow to store custom settings in XML  based, strongly typed file.  In this post I focus on Web.config file and demonstrate how to create custom section for this type of file.  At the beginning  we need some basic configuration file which is easy to get one because after we created new ASP.NET project from a template we already should have one. Simplified version on Web.config looks like as rese...