System.Web.Security 命名空间

包含用于在 Web 服务器应用程序中实现 ASP.NET 安全性的类。

ActiveDirectoryMembershipProvider

为 Active Directory 和 Active Directory 应用程序模式服务器中的 ASP.NET 应用程序管理成员资格信息的存储。

ActiveDirectoryMembershipUser

公开和更新 Active Directory 数据存储区中存储的成员资格用户信息。

AnonymousIdentificationEventArgs

提供 AnonymousIdentification_Creating 事件的数据。 此类不能被继承。

AnonymousIdentificationModule

管理 ASP.NET 应用程序的匿名标识符。

AuthorizationStoreRoleProvider

在 XML 文件中、Active Directory 中或 Active Directory 应用程序模式服务器上管理 ASP.NET 应用程序的角色成员资格信息在授权管理器策略存储区中的存储。

DefaultAuthenticationEventArgs

为 DefaultAuthentication_OnAuthenticate 事件提供数据。 此类不能被继承。

DefaultAuthenticationModule

确保上下文中存在身份验证对象。 此类不能被继承。

FileAuthorizationModule

验证远程用户是否具有访问所请求的文件的权限。 此类不能被继承。

FormsAuthentication

为 Web 应用程序管理 Forms 身份验证服务。 此类不能被继承。

FormsAuthenticationEventArgs

为 FormsAuthentication_OnAuthenticate 事件提供数据。 此类不能被继承。

FormsAuthenticationModule

启用 Forms 身份验证的情况下设置 ASP.NET 应用程序用户的标识。 此类不能被继承。

FormsAuthenticationTicket

提供对票证的属性和值的访问,这些票证用于 Forms 身份验证对用户进行标识。 此类不能被继承。

FormsIdentity

表示一个使用 Forms 身份验证进行了身份验证的用户标识。 此类不能被继承。

MachineKey

提供一种使用与 ASP.NET 窗体身份验证和视图状态所用相同的算法和密钥值对数据进行加密或哈希处理(或两者)的方法。

Membership

验证用户凭据并管理用户设置。 此类不能被继承。

MembershipCreateUserException

当成员资格提供程序未能成功创建用户时引发的异常。

MembershipPasswordAttribute

验证密码字段是否满足成员资格提供程序的当前密码要求。

MembershipPasswordException

当无法从密码存储区检索密码时引发的异常。

MembershipProvider

定义 ASP.NET 为使用自定义成员资格提供程序提供成员资格服务而实现的协定。

MembershipProviderCollection

继承 MembershipProvider 抽象类的对象的集合。

MembershipUser

公开和更新成员资格数据存储中的成员资格用户信息。

MembershipUserCollection

MembershipUser 对象的集合。

PassportAuthenticationEventArgs

Authenticate 传递到 PassportAuthenticationModule 事件的事件参数。 由于此处已存在一个标识,因此这主要用于使用已提供的标识将自定义 IPrincipal 对象附加到上下文。 此类已弃用。

PassportAuthenticationModule

提供围绕 Passport 身份验证服务的包装。 此类不能被继承。 此类已弃用。

PassportIdentity

提供要由 PassportAuthenticationModule 使用的类。 它为应用程序提供了一种访问 Ticket(String) 方法的途径。 此类不能被继承。 此类已弃用。

PassportPrincipal

表示一个经过 Passport 身份验证的主体。 此类已弃用。

RoleManagerEventArgs

RoleManagerModule 类的 GetRoles 事件提供事件数据。

RoleManagerModule

管理当前用户的 RolePrincipal 实例。 此类不能被继承。

RolePrincipal

表示当前 HTTP 请求的安全信息,包括角色成员资格。 此类不能被继承。

RoleProvider

定义 ASP.NET 为使用自定义角色提供程序提供角色管理服务而实现的协定。

RoleProviderCollection

继承 RoleProvider 抽象类的对象的集合。

Roles

管理角色中的用户成员资格,以便在 ASP.NET 应用程序中进行授权检查。 此类不能被继承。

SqlMembershipProvider

管理 SQL Server 数据库中 ASP.NET 应用程序的成员资格信息存储。

SqlRoleProvider

对 ASP.NET 应用程序的角色成员资格信息在 SQL Server 数据库中的存储进行管理。

UrlAuthorizationModule

验证用户具有访问所请求的 URL 的权限。 此类不能被继承。

ValidatePasswordEventArgs

MembershipProvider 类的 ValidatingPassword 事件提供事件数据。

WindowsAuthenticationEventArgs

为 WindowsAuthentication_OnAuthenticate 事件提供数据。 此类不能被继承。

WindowsAuthenticationModule

启用 Windows 身份验证的情况下设置 ASP.NET 应用程序用户的标识。 此类不能被继承。

WindowsTokenRoleProvider

通过 Windows 组成员资格获取 ASP.NET 应用程序的角色信息。

枚举

ActiveDirectoryConnectionProtection

指定 ActiveDirectoryMembershipProvider 类所支持的连接保护选项。

CookieProtection

描述 Cookie 中信息的保护方式。

MachineKeyProtection

指定值,这些值指示应该对数据进行加密还是解密,应该追加还是验证基于哈希的消息验证代码 (HMAC),或者两个操作都执行。

MembershipCreateStatus

描述 CreateUser(String, String) 操作的结果。

MembershipPasswordFormat

描述用于存储成员身份用户密码的加密格式。

委托

AnonymousIdentificationEventHandler

表示处理 AnonymousIdentificationModuleAnonymousIdentification_Creating 事件的方法。

DefaultAuthenticationEventHandler

表示处理 DefaultAuthenticationModule 的 DefaultAuthentication_OnAuthenticate 事件的方法

FormsAuthenticationEventHandler

表示处理 FormsAuthenticationModuleFormsAuthentication_OnAuthenticate 事件的方法。

MembershipValidatePasswordEventHandler

表示将处理 MembershipProvider 类的 ValidatingPassword 事件的方法。

PassportAuthenticationEventHandler

表示处理 PassportAuthenticationModulePassportAuthentication_OnAuthenticate 事件的方法。 此类已弃用。

RoleManagerEventHandler

GetRoles 类的 RoleManagerModule 事件定义委托。

WindowsAuthenticationEventHandler

表示处理 WindowsAuthenticationModuleWindowsAuthentication_OnAuthenticate 事件的方法。

注解

ASP.NET Membership 应用程序使用 类来验证用户凭据和管理用户设置,例如密码和电子邮件地址。 类 Roles 使你能够基于分配给 Web 应用程序中角色的用户组管理应用程序的授权。

Membership类和 Roles 类都使用访问应用程序的数据存储以检索成员身份和角色信息的提供程序。 成员身份和角色信息可以使用 和 SqlRoleProvider 类存储在 Microsoft SQL Server 数据库中SqlMembershipProvider;使用 ActiveDirectoryMembershipProviderAuthorizationStoreRoleProvider 类存储在 Active Directory 中,或使用 和 RoleProvider 类的MembershipProvider实现存储在自定义数据源中。

可以使用 成员资格元素 (ASP.NET 设置架构) 配置 ASP.NET 成员身份。 访问使用成员身份的应用程序时,ASP.NET 创建可用于查询成员身份信息的 类的 Membership 实例。 类的特定于提供程序的 MembershipUser 实现包含有关访问页面的用户的信息。 可以为应用程序创建 类的 MembershipUser 自定义实现。

使用 roleManager 元素 (ASP.NET 设置架构) 配置 ASP.NET 角色。 ASP.NET 创建 类的 Roles 实例,其中包含有关当前用户的角色成员身份的信息。

ASP.NET 提供与 Membership 类和 Roles 类交互的服务器控件。 、 LoginCreateUserWizardChangePassword 控件与 Membership 类配合使用以简化创建经过身份验证的 Web 应用程序,并且LoginView控件使用特定于角色的模板为特定用户组自定义网页。

另请参阅