FederatedAuthentication.FederationConfiguration 属性

定义

获取 HTTP 模块在该 Web 应用程序使用的单独 FederationConfiguration 实例。Gets the singleton FederationConfiguration instance used by the HTTP modules in this web application.

public:
 static property System::IdentityModel::Services::Configuration::FederationConfiguration ^ FederationConfiguration { System::IdentityModel::Services::Configuration::FederationConfiguration ^ get(); };
public static System.IdentityModel.Services.Configuration.FederationConfiguration FederationConfiguration { get; }
member this.FederationConfiguration : System.IdentityModel.Services.Configuration.FederationConfiguration
Public Shared ReadOnly Property FederationConfiguration As FederationConfiguration

属性值

联合配置实例。The federation configuration instance.

异常

FederationConfiguration 属性将由 null 事件的事件处理程序设置为 FederationConfigurationCreatedThe FederationConfiguration property is set to null by an event handler for the FederationConfigurationCreated event.

注解

第一次访问此属性时,将从配置文件中的<federationConfiguration>元素创建和初始化 FederationConfiguration 的对象。A FederationConfiguration object is created and initialized from the <federationConfiguration> element in the configuration file the first time this property is accessed by one of the HTTP modules. 在初始化配置对象之后,会引发 FederationConfigurationCreated 事件,使开发人员能够在用于初始化任何已配置的 HTTP 模块之前修改新创建的配置对象。Just after the configuration object has been initialized, the FederationConfigurationCreated event is raised to provide a developer with an opportunity to modify the newly created configuration object before it is used to initialize any of the configured HTTP modules. 它可以从事件处理程序中的 FederationConfigurationCreatedEventArgs.FederationConfiguration 属性进行访问。It can be accessed from the FederationConfigurationCreatedEventArgs.FederationConfiguration property in an event handler.

在后续访问时,将返回相同的配置实例。On subsequent accesses, the same configuration instance is returned.

根据特定模块是否存在,将在初始化过程中从以下方法中访问属性: ClaimsAuthorizationModule.InitializePropertiesFromConfigurationSessionAuthenticationModule.InitializePropertiesFromConfigurationWSFederationAuthenticationModule.InitializePropertiesFromConfigurationDepending on whether specific modules are present, the property is accessed from within the following methods during initialization: ClaimsAuthorizationModule.InitializePropertiesFromConfiguration, SessionAuthenticationModule.InitializePropertiesFromConfiguration, and WSFederationAuthenticationModule.InitializePropertiesFromConfiguration.

重要

在使用 ClaimsPrincipalPermission 类或 ClaimsPrincipalPermissionAttribute 类时,用于评估基于声明的访问检查的声明授权管理器(ClaimsAuthorizationManager)是在通过 FederatedAuthentication.FederationConfiguration 属性引用的联合身份验证配置对象上设置的 IdentityConfiguration 对象上配置的。The claims authorization manager (ClaimsAuthorizationManager) that is used to evaluate claims based access checks when using the ClaimsPrincipalPermission class or the ClaimsPrincipalPermissionAttribute class is configured on the IdentityConfiguration object that is set on the federation configuration object referenced through the FederatedAuthentication.FederationConfiguration property. 无论应用程序是否 ASP.NET 应用程序都是如此。This is true for all applications whether they are ASP.NET applications or not.

适用于

另请参阅