Upgrade your Internet Experience
United States - English
Argentina (Español)
Australia (English)
Brasil (Português)
Canada (English)
Canada (Français)
中国 (简体中文)
Colombia (Español)
Deutschland (Deutsch)
España (Español)
France (Français)
India (English)
Italia (Italiano)
日本 (日本語)
México (Español)
Perú (Español)
Россия (Pусский)
United Kingdom (English)
United States (English)
More...
Microsoft.com
Welcome
Sign in
.NET Framework Developer Center
Home
Library
Learn
Downloads
Support
Community
Forums
Classic
  |  
Lightweight Beta
  |  
ScriptFree
Printer Friendly Version
Send
Community Content
Click to Rate and Give Feedback
Give feedback on this content
MSDN Library
MSDN
Please Wait
MSDN Library
Please Wait
.NET Development
Please Wait
.NET Framework 2.0
Please Wait
Class Library Reference
Please Wait
System.Configuration
Please Wait
Collapse All
Expand All
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0
Other versions are also available for the following:
Microsoft Visual Studio 2003/.NET Framework 1.1
.NET Framework 3.0
Microsoft Visual Studio 2008/.NET Framework 3.5
Microsoft Visual Studio 2010/.NET Framework 4
Want more? Here are some additional resources on this topic:
ConfigurationElement Class (System.Configuration)
.NET Framework Class Library
System.Configuration Namespace
The
System.Configuration
namespace contains the types that provide the programming model for handling configuration data.
Classes
Class
Description
ApplicationScopedSettingAttribute
Specifies that an application settings property has a common value for all users of an application. This class cannot be inherited.
ApplicationSettingsBase
Acts as a base class for deriving concrete wrapper classes to implement the application settings feature in Window Forms applications.
ApplicationSettingsGroup
Represents a grouping of related application settings sections within a configuration file. This class cannot be inherited.
AppSettingsReader
Provides a method for reading values of a particular type from the configuration.
AppSettingsSection
Provides configuration system support for the
appSettings
configuration section. This class cannot be inherited.
CallbackValidator
Provides dynamic validation of an object.
CallbackValidatorAttribute
Specifies a
CallbackValidator
object to use for code validation. This class cannot be inherited.
ClientSettingsSection
Represents a group of user-scoped application settings in a configuration file.
CommaDelimitedStringCollection
Represents a collection of string elements separated by commas. This class cannot be inherited.
CommaDelimitedStringCollectionConverter
Converts a comma-delimited string value to and from a
CommaDelimitedStringCollection
object. This class cannot be inherited.
Configuration
Represents a configuration file applicable to a particular computer, application, or resource. This class cannot be inherited.
ConfigurationCollectionAttribute
Declaratively instructs the .NET Framework to instantiate a configuration element collection. This class cannot be inherited.
ConfigurationConverterBase
The base class for the configuration converter types.
ConfigurationElement
Represents a configuration element within a configuration file.
ConfigurationElementCollection
Represents a configuration element containing a collection of child elements.
ConfigurationElementProperty
Specifies the property of a configuration element. This class cannot be inherited.
ConfigurationErrorsException
The exception that is thrown when a configuration-system error has occurred.
ConfigurationException
The exception that is thrown when a configuration system error has occurred.
ConfigurationFileMap
Defines the configuration file mapping for the machine configuration file.
ConfigurationLocation
Represents a
location
element within a configuration file.
ConfigurationLocationCollection
Contains a collection of
ConfigurationLocationCollection
objects.
ConfigurationLockCollection
Contains a collection of locked configuration objects. This class cannot be inherited.
ConfigurationManager
Provides access to configuration files for client applications. This class cannot be inherited.
ConfigurationPermission
Provides a permission structure that allows methods or classes to access configuration files.
ConfigurationPermissionAttribute
Creates a
ConfigurationPermission
object that either grants or denies the marked target permission to access sections of configuration files.
ConfigurationProperty
Represents an attribute or a child of a configuration element. This class cannot be inherited.
ConfigurationPropertyAttribute
Declaratively instructs the .NET Framework to instantiate a configuration property. This class cannot be inherited.
ConfigurationPropertyCollection
Represents a collection of configuration-element properties.
ConfigurationSection
Represents a section within a configuration file.
ConfigurationSectionCollection
Represents a collection of related sections within a configuration file.
ConfigurationSectionGroup
Represents a grouping of related sections within a configuration file.
ConfigurationSectionGroupCollection
Represents a collection of
ConfigurationSectionGroup
objects.
ConfigurationSettings
Provides runtime support for reading configuration sections and common configuration settings.
ConfigurationValidatorAttribute
Serves as the base class for the
System.Configuration
validator attribute types.
ConfigurationValidatorBase
Acts as a base class for deriving a validation class so that a value of an object can be verified.
ConfigXmlDocument
Wraps the corresponding
XmlDocument
type and also carries the necessary information for reporting file-name and line numbers.
ConnectionStringSettings
Represents a single, named connection string in the connection strings configuration file section.
ConnectionStringSettingsCollection
Contains a collection of
ConnectionStringSettings
objects.
ConnectionStringsSection
Provides programmatic access to the connection strings configuration-file section.
ContextInformation
Encapsulates the context information that is associated with a
ConfigurationElement
object. This class cannot be inherited.
DefaultSection
Represents a basic configuration-section handler that exposes the configuration section's XML for both read and write access.
DefaultSettingValueAttribute
Specifies the default value for an application settings property.
DefaultValidator
Provides validation of an object. This class cannot be inherited.
DictionarySectionHandler
Provides key/value pair configuration information from a configuration section.
DpapiProtectedConfigurationProvider
Provides a
ProtectedConfigurationProvider
object that uses the Windows data protection API (DPAPI) to encrypt and decrypt configuration data.
ElementInformation
Contains meta-information about an individual element within the configuration. This class cannot be inherited.
ExeConfigurationFileMap
Defines the configuration file mapping for an Exe.config file. This class cannot be inherited.
ExeContext
Manages the path context for the current application. This class cannot be inherited.
GenericEnumConverter
Converts between a string and an enumeration type.
IgnoreSection
Provides a wrapper type definition for configuration sections that are not handled by the
System.Configuration
types.
IgnoreSectionHandler
Provides a legacy section-handler definition for configuration sections that are not handled by the
System.Configuration
types.
InfiniteIntConverter
Converts between a string and the standard infinite or integer value.
InfiniteTimeSpanConverter
Converts between a string and the standard infinite
TimeSpan
value.
IntegerValidator
Provides validation of an
Int32
.
IntegerValidatorAttribute
Declaratively instructs the .NET Framework to perform integer validation on a configuration property. This class cannot be inherited.
KeyValueConfigurationCollection
Contains a collection of
KeyValueConfigurationElement
objects.
KeyValueConfigurationElement
Represents a configuration element that contains a key/value pair.
LocalFileSettingsProvider
Provides persistence for application settings classes.
LongValidator
Provides validation of an
Int64
.
LongValidatorAttribute
Declaratively instructs the .NET Framework to perform long-integer validation on a configuration property. This class cannot be inherited.
NameValueConfigurationCollection
Contains a collection of
NameValueConfigurationElement
objects. This class cannot be inherited.
NameValueConfigurationElement
A configuration element that contains a
String
name and
String
value. This class cannot be inherited.
NameValueFileSectionHandler
Provides access to a configuration file. This type supports the .NET Framework configuration infrastructure and is not intended to be used directly from your code.
NameValueSectionHandler
Provides name/value-pair configuration information from a configuration section.
NoSettingsVersionUpgradeAttribute
Specifies that a settings provider should disable any logic that gets invoked when an application upgrade is detected. This class cannot be inherited.
PositiveTimeSpanValidator
Provides validation of a
TimeSpan
object. This class cannot be inherited.
PositiveTimeSpanValidatorAttribute
Declaratively instructs the .NET Framework to perform time validation on a configuration property. This class cannot be inherited.
PropertyInformation
Contains meta-information on an individual property within the configuration. This type cannot be inherited.
PropertyInformationCollection
Contains a collection of
PropertyInformation
objects. This class cannot be inherited.
ProtectedConfiguration
Provides access to the protected-configuration providers for the current application's configuration file.
ProtectedConfigurationProvider
Is the base class to create providers for encrypting and decrypting protected-configuration data.
ProtectedConfigurationProviderCollection
Provides a collection of
ProtectedConfigurationProvider
objects.
ProtectedConfigurationSection
Provides programmatic access to the
configProtectedData
configuration section. This class cannot be inherited.
ProtectedProviderSettings
Represents a group of configuration elements that configure the providers for the
<configProtectedData>
configuration section.
ProviderSettings
Represents a group of configuration elements that configure a provider.
ProviderSettingsCollection
Represents a collection of
ProviderSettings
objects.
RegexStringValidator
Provides validation of a string based on the rules provided by a regular expression.
RegexStringValidatorAttribute
Declaratively instructs the .NET Framework to perform string validation on a configuration property using a regular expression. This class cannot be inherited.
RsaProtectedConfigurationProvider
Provides a
ProtectedConfigurationProvider
that uses RSA encryption to encrypt and decrypt configuration data.
SectionInformation
Contains meta-information on an individual section within the configuration. This class cannot be inherited.
SettingAttribute
Represents a custom settings attribute used to associate settings information with a settings property.
SettingChangingEventArgs
Provides data for the
SettingChanging
event.
SettingElement
Represents a simplified configuration element used for updating elements in the configuration. This class cannot be inherited.
SettingElementCollection
Contains a collection of
SettingElement
objects. This class cannot be inherited.
SettingsAttributeDictionary
Represents a collection of key/value pairs used to describe a configuration object as well as a
SettingsProperty
object.
SettingsBase
Provides the base class used to support user property settings.
SettingsContext
Provides contextual information that the provider can use when persisting settings.
SettingsDescriptionAttribute
Provides a string that describes an individual configuration property. This class cannot be inherited.
SettingsGroupDescriptionAttribute
Provides a string that describes an application settings property group. This class cannot be inherited.
SettingsGroupNameAttribute
Specifies a name for application settings property group. This class cannot be inherited.
SettingsLoadedEventArgs
Provides data for the
SettingsLoaded
event.
SettingsManageabilityAttribute
Specifies special services for application settings properties. This class cannot be inherited.
SettingsProperty
Used internally as the class that represents metadata about an individual configuration property.
SettingsPropertyCollection
Contains a collection of
SettingsProperty
objects.
SettingsPropertyIsReadOnlyException
Provides an exception for read-only
SettingsProperty
objects.
SettingsPropertyNotFoundException
Provides an exception for
SettingsProperty
objects that are not found.
SettingsPropertyValue
Contains the value of a settings property that can be loaded and stored by an instance of
SettingsBase
.
SettingsPropertyValueCollection
Contains a collection of settings property values, mapping
SettingsProperty
objects to
SettingsPropertyValue
objects.
SettingsPropertyWrongTypeException
Provides an exception that is thrown when an invalid type is used with a
SettingsProperty
object.
SettingsProvider
Acts as a base class for deriving custom settings providers in the application settings architecture.
SettingsProviderAttribute
Specifies the settings provider used to provide storage for the current application settings class or property. This class cannot be inherited.
SettingsProviderCollection
Represents a collection of application settings providers.
SettingsSerializeAsAttribute
Specifies the serialization mechanism that the settings provider should use. This class cannot be inherited.
SettingValueElement
Contains the XML representing the serialized value of the setting. This class cannot be inherited.
SingleTagSectionHandler
Handles configuration sections that are represented by a single XML tag in the .config file.
SpecialSettingAttribute
Indicates that an application settings property has a special significance. This class cannot be inherited.
StringValidator
Provides validation of a string.
StringValidatorAttribute
Declaratively instructs the .NET Framework to perform string validation on a configuration property. This class cannot be inherited.
SubclassTypeValidator
Validates that an object is a derived class of a specified type.
SubclassTypeValidatorAttribute
Declaratively instructs the .NET Framework to perform validation on a configuration property. This class cannot be inherited.
TimeSpanMinutesConverter
Converts a time span expressed in minutes.
TimeSpanMinutesOrInfiniteConverter
Converts a
TimeSpan
expressed in minutes or as a standard infinite time span.
TimeSpanSecondsConverter
Converts a time span expressed in seconds.
TimeSpanSecondsOrInfiniteConverter
Converts a
TimeSpan
expressed in seconds or as a standard infinite time span.
TimeSpanValidator
Provides validation of a
TimeSpan
.
TimeSpanValidatorAttribute
Declaratively instructs the .NET Framework to perform time validation on a configuration property. This class cannot be inherited.
TypeNameConverter
Converts between type and string value. This class cannot be inherited.
UserScopedSettingAttribute
Specifies that an application settings group or property contains distinct values for each user of an application. This class cannot be inherited.
UserSettingsGroup
Represents a grouping of related user settings sections within a configuration file. This class cannot be inherited.
WhiteSpaceTrimStringConverter
Converts a string to its canonical format.
Interfaces
Interface
Description
IApplicationSettingsProvider
Defines extended capabilities for client-based application settings providers.
IConfigurationSectionHandler
Handles the access to certain configuration sections.
IConfigurationSystem
Provides standard configuration methods.
IPersistComponentSettings
Defines standard functionality for controls or libraries that store and retrieve application settings.
ISettingsProviderService
Provides an interface for defining an alternate application settings provider.
Delegates
Delegate
Description
SettingChangingEventHandler
Represents the method that will handle the
SettingChanging
event.
SettingsLoadedEventHandler
Represents the method that will handle the
SettingsLoaded
event.
SettingsSavingEventHandler
Represents the method that will handle the
SettingsSaving
event.
ValidatorCallback
Represents a method to be called after the validation of an object.
Enumerations
Enumeration
Description
ConfigurationAllowDefinition
Specifies the locations within the configuration-file hierarchy that can set or override the properties contained within a
ConfigurationSection
object.
ConfigurationAllowExeDefinition
Specifies the locations within the configuration-file hierarchy that can set or override the properties contained within a
ConfigurationSection
object.
ConfigurationElementCollectionType
Specifies the type of a
ConfigurationElementCollectionType
object.
ConfigurationPropertyOptions
Specifies the options to apply to a property.
ConfigurationSaveMode
Determines which properties are written out to a configuration file.
ConfigurationUserLevel
Used to specify which configuration file is to be represented by the Configuration object returned by
OpenExeConfiguration
.
PropertyValueOrigin
Specifies the level in the configuration hierarchy where a configuration property value originated.
SettingsManageability
Provides values to indicate which services should be made available to application settings.
SettingsSerializeAs
Determines the serialization scheme used to store application settings.
SpecialSetting
Specifies the special setting category of a application settings property.
Tags
:
Add a tag
Add
Cancel
Flag as
ContentBug
Community Content
Add new content
Annotations
Need more code examples
Jason Week -- MSFT
|
Edit
|
Show History
Please Wait
system.cofiguration.blahblahblah
Tags
:
contentbug
(
x
)
Add a tag
Add
Cancel
Flag as
ContentBug
Why only relative paths to external config files?
ChuckC
|
Edit
|
Show History
Please Wait
I'm trying to reuse configuration information among several similar applications.
I want to store the config section in a separate file on my network, so I can include it in the various app.config files.
Now I find out that the configSource attribute only supports RELATIVE paths.
This is completely idiotic - how in the world are we supposed to share common config files?
Tags
:
Add a tag
Add
Cancel
Flag as
ContentBug
Custom filename ?
Bluesman1975
|
Edit
|
Show History
Please Wait
Any way to read a custom filename ?
Thanx
Tags
:
Add a tag
Add
Cancel
Flag as
ContentBug
|
Edit
Tags
:
Add a tag
Add
Cancel
Flag as
ContentBug
© 2010 Microsoft Corporation. All rights reserved.
Terms of Use
|
Trademarks
|
Privacy Statement