I am trying to define custom settings in my web.config file and I'm pretty sure I have most of it correct and it all makes sense, except the one crucial part where I don't understand what I'm supposed to use. The tutorial I used to create my SectionHandler, didn't go into an explanation of it and MSDN isn't really helping me fully understand it either.
This comes from the tutorial I used:
<section name="BlogSettings" type="Fully.Qualified.TypeName.BlogSettings,
AssemblyName" />
Link to Tutorial
This is from MSDN:
type="System.Configuration.SingleTagSectionHandler"
Yes, I am very new to ASP.NET and I'm trying to learn. I would be happy with any good references that explain what's going on here.
web. config file is an XML-based configuration file used in ASP. NET-based applications to manage various settings that are concerned with the configuration of our website. In this way, we can separate our application logic from configuration logic.
config file contains default and the machine-specific value for all supported settings. The machine settings are controlled by the system administrator and applications are generally not given access to this file. An application however, can override the default values by creating web. config files in its roots folder.
The web. config is a file that is read by IIS and the ASP.NET Core Module to configure an app hosted with IIS.
The type Attribute of the Section in web.config is the "path" to the corresponding ConfigurationSection
class you have implemented. The ConfigurationSection class is the class that defines the section and the possible configuration content.
The ConfigurationSection
is the base class of all configuration sections.
This belongs to .NET in general, not only web.config.
Check out Unraveling the Mysteries of .NET 2.0 Configuration
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With