SectionDefinition Class

 

Defines a configuration section.

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

System.Object
  Microsoft.Web.Administration.SectionDefinition

Public NotInheritable Class SectionDefinition

NameDescription
System_CAPS_pubpropertyAllowDefinition

Gets or sets a value indicating valid configuration path locations for the configuration section.

System_CAPS_pubpropertyAllowLocation

Gets or sets a value indicating whether the configuration section allows the location attribute.

System_CAPS_pubpropertyName

Gets the name of the current configuration section definition.

System_CAPS_pubpropertyOverrideModeDefault

Gets or sets the default override behavior for the current configuration section.

System_CAPS_pubpropertyRequirePermission

System_CAPS_pubpropertyType

Gets or sets the type name of a class that implements the configuration section and can interpret the persisted XML.

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(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.

<configuration>

<configSections>

<section name="sampleSection"

type="System.Configuration.SingleTagSectionHandler"

allowLocation="false"/>

</configSections>

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

setting3="third value" />

</configuration>

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

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

Return to top
Show: