Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SectionDefinition Class

Defines a configuration section.


Namespace:  Microsoft.Web.Administration
Assembly:  Microsoft.Web.Administration (in Microsoft.Web.Administration.dll)

type SectionDefinition =  class end

The SectionDefinition type exposes the following members.

Public propertyAllowDefinitionGets or sets a value indicating valid configuration path locations for the configuration section.
Public propertyAllowLocationGets or sets a value indicating whether the configuration section allows the location attribute.
Public propertyNameGets the name of the current configuration section definition.
Public propertyOverrideModeDefaultGets or sets the default override behavior for the current configuration section.
Public propertyRequirePermission
Public propertyTypeGets or sets the type name of a class that implements the configuration section and can interpret the persisted XML.

Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)

Declaring a configuration section defines a new element for the configuration file. The new element contains settings that a configuration section handler reads. The attributes and child elements of a section you define depend on the section handler you use to read your settings.

The following <configuration> element contains an example of the <section> element that the SectionDefinition class represents.



<section name="sampleSection"




<sampleSection setting1="Value1" setting2="value two"

setting3="third value" />


The following example shows how to define a configuration section and to define settings for that section.

No code example is currently available or this language may not be supported.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

© 2015 Microsoft