FormsAuthenticationCredentials 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为使用基于表单的身份验证的 ASP.NET 应用程序配置用户凭据。
public ref class FormsAuthenticationCredentials sealed : System::Configuration::ConfigurationElement
public sealed class FormsAuthenticationCredentials : System.Configuration.ConfigurationElement
type FormsAuthenticationCredentials = class
inherit ConfigurationElement
Public NotInheritable Class FormsAuthenticationCredentials
Inherits ConfigurationElement
- 继承
注解
该FormsAuthenticationCredentials类提供了一种以编程方式访问和修改credentials配置文件节中forms节的元素authentication的方法。 此类型是包含 FormsAuthenticationConfiguration类型、类型和 FormsAuthenticationUserCollection类型的组的 FormsAuthenticationUser 一部分。 除集合类型外,所有其他项都直接影响基础配置标记。
Warning
将用户凭据存储在 credentials 部分中 不安全。 请改用 Azure 密钥保管库。
注释
可以根据 FormsAuthenticationCredentials 配置文件定义的 MachineToApplication限制将信息写入配置文件的相关部分。 在层次结构中不允许的某个级别的配置文件中写入的任何尝试都将导致分析程序生成的错误消息。 但是,可以使用此类在层次结构中的任何级别读取配置信息。 为了获得安全性和可伸缩性,建议使用 Azure 密钥保管库 来存储用户凭据。
构造函数
| 名称 | 说明 |
|---|---|
| FormsAuthenticationCredentials() |
初始化 FormsAuthenticationCredentials 类的新实例。 |