FormsAuthenticationUser 类

为使用窗体身份验证的 Web 应用程序配置用户凭据。

语法

class FormsAuthenticationUser : CollectionElement  

方法

此类不包含任何方法。

属性

下表列出了 FormsAuthenticationUser 类公开的属性。

名称 描述
Name 一个只读 string 值,包含 Web 应用程序所需的登录用户名。 键属性。
Password 一个读/写 string 值,指定 Web 应用程序所需的用户密码。

子类

此类不包含子类。

注解

此类的实例包含在 FormsAuthenticationCredentials 类的 Credentials 属性中。

FormsAuthenticationUser 对象只能在计算机、站点或应用程序级别将信息写入配置文件的相关部分。 如果尝试在层次结构中的不同级别写入配置文件,则一定会导致解析器生成错误消息。 但是,可以使用此类读取层次结构中任何级别的配置信息。 为了获得安全性和可伸缩性,应使用外部存储库(如数据库)来保留用户凭据。

继承层次结构

CollectionElement

FormsAuthenticationUser

要求

类型 描述
客户端 - IIS 7.0(在 Windows Vista 上)
- Windows 7 上的 IIS 7.5
- Windows 8 上的 IIS 8.0
- Windows 10 上的 IIS 10.0
服务器 - Windows Server 2008 上的 IIS 7.0
- Windows Server 2008 R2 上的 IIS 7.5
- Windows Server 2012 上的 IIS 8.0
- Windows Server 2012 R2 上的 IIS 8.5
- Windows Server 2016 上的 IIS 10.0
产品 - IIS 7.0、IIS 7.5、IIS 8.0、IIS 8.5、IIS 10.0
MOF 文件 WebAdministration.mof

另请参阅

AnonymousAuthenticationSection 类
AuthenticationSection 类
BasicAuthenticationSection 类
ClientCertificateMappingAuthenticationSection 类
CollectionElement 类
DigestAuthenticationSection 类
FormsAuthenticationConfiguration 类
FormsAuthenticationCredentials 类
IisClientCertificateMappingAuthenticationSection 类
PassportAuthentication 类
WindowsAuthenticationSection 类