Export (0) Print
Expand All

FederationConfiguration Constructor (Boolean)

.NET Framework 4.5

Initializes a new instance of the FederationConfiguration class by optionally loading settings from the system.identityModel.services section of the configuration file.

Namespace:  System.IdentityModel.Services.Configuration
Assembly:  System.IdentityModel.Services (in System.IdentityModel.Services.dll)

public FederationConfiguration(
	bool loadConfig


Type: System.Boolean

true to initialize with settings loaded from the configuration file; false to initialize to default values.


The system.identityModel configuration section is not defined in the configuration file.

Caution noteCaution

Before the new FederationConfiguration instance is used by any of the configured HTTP modules, call the Initialize method to ensure that the instance is properly initialized.

The system.identityModel section must be specified in a <section> element under the <configSections> element in the configuration file or an exception is thrown.

    <section name="system.identityModel" type="System.IdentityModel.Configuration.SystemIdentityModelSection, System.IdentityModel, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089" />

If loadConfig is true and only a single <federationConfiguration> element is specified, settings are loaded using that element. If multiple <federationConfiguration> elements are specified, the method attempts to load settings from the element that is unnamed of that has the DefaultFederationConfigurationName. If such an element does not exist, the method returns without loading settings. This results in an exception when the Initialize method is called.

Caution noteCaution

Microsoft recommends that if you specify multiple <federationConfiguration> elements in the system.identityModel.services configuration section that at least one of them is unnamed or has its name set to an empty string.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft