संपादित करें

इसके माध्यम से साझा किया गया


FederationConfiguration Constructors

Definition

Initializes a new instance of the FederationConfiguration class.

Overloads

FederationConfiguration()

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

FederationConfiguration(Boolean)

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

FederationConfiguration(String)

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

Remarks

Important

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.

FederationConfiguration()

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

public:
 FederationConfiguration();
public FederationConfiguration ();
Public Sub New ()

Remarks

The properties in the new instance are initialized by loading settings from the <system.identityModel.services> configuration section. This constructor calls the FederationConfiguration.FederationConfiguration(Boolean) constructor with the loadConfig parameter true.

Warning

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.

See also

Applies to

FederationConfiguration(Boolean)

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

public:
 FederationConfiguration(bool loadConfig);
public FederationConfiguration (bool loadConfig);
new System.IdentityModel.Services.Configuration.FederationConfiguration : bool -> System.IdentityModel.Services.Configuration.FederationConfiguration
Public Sub New (loadConfig As Boolean)

Parameters

loadConfig
Boolean

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

Exceptions

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

Remarks

Warning

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.

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

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.

Warning

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.

Applies to

FederationConfiguration(String)

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

public:
 FederationConfiguration(System::String ^ federationConfigurationName);
public FederationConfiguration (string federationConfigurationName);
new System.IdentityModel.Services.Configuration.FederationConfiguration : string -> System.IdentityModel.Services.Configuration.FederationConfiguration
Public Sub New (federationConfigurationName As String)

Parameters

federationConfigurationName
String

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

Exceptions

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.

Remarks

Warning

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>

Applies to