Export (0) Print
Expand All

FederationConfiguration Constructor (String)

.NET Framework 4.5

Initializes a new instance of the FederationConfiguration class from the <federationConfiguration> element with the specified name.

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

public FederationConfiguration(
	string federationConfigurationName
)

Parameters

federationConfigurationName
Type: System.String

The name of the <federationConfiguration> element from which to load the configuration.

ExceptionCondition
InvalidOperationException

There is no system.identityModel.services section defined in the configuration file.

-or-

There is no system.identityModel section defined in the configuration file.

-or-

There is no <federationConfiguration> element with the specified name in the system.identityModel.services section.

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.

If this constructor is called then a <system.identityModel.services> configuration section with a <federationConfiguration> element that has the specified name must exist in the configuration file.

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

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

.NET Framework

Supported in: 4.6, 4.5
Show:
© 2015 Microsoft