System.Web.Security Namespace

System.Web.Security 命名空間 (Namespace) 包含可在 Web 伺服器應用程式中用來實作 ASP.NET 安全性的類別。 The System.Web.Security namespace contains classes that are used to implement ASP.NET security in Web server applications.

類別

ActiveDirectoryMembershipProvider

管理 Active Directory 和 Active Directory 應用程式模式伺服器中 ASP.NET 應用程式之成員資格資訊的儲存。Manages storage of membership information for an ASP.NET application in Active Directory and Active Directory Application Mode servers.

ActiveDirectoryMembershipUser

公開及更新 Active Directory 資料存放區中儲存的成員資格使用者資訊。Exposes and updates membership user information stored in an Active Directory data store.

AnonymousIdentificationEventArgs

提供 AnonymousIdentification_Creating 事件的資料。Provides data for the AnonymousIdentification_Creating event. 此類別無法被繼承。This class cannot be inherited.

AnonymousIdentificationModule

為 ASP.NET 應用程式管理匿名識別項。Manages anonymous identifiers for the ASP.NET application.

AuthorizationStoreRoleProvider

管理授權管理員原則存放區中 ASP.NET 應用程式的角色成員資格資訊儲存區,位於 XML 檔案、Active Directory 或 Active Directory 應用程式模式伺服器之中。Manages storage of role-membership information for an ASP.NET application in an authorization-manager policy store, either in an XML file, in an Active Directory, or on an Active Directory Application Mode server.

DefaultAuthenticationEventArgs

提供資料給 DefaultAuthentication_OnAuthenticate 事件。Provides data for the DefaultAuthentication_OnAuthenticate event. 這個類別無法被繼承。This class cannot be inherited.

DefaultAuthenticationModule

確定內容中有驗證 (Authentication) 物件。Ensures that an authentication object is present in the context. 這個類別無法被繼承。This class cannot be inherited.

FileAuthorizationModule

確認使用者具有權限,可以存取所要求的檔案。Verifies that the user has permission to access the file requested. 這個類別無法被繼承。This class cannot be inherited.

FormsAuthentication

管理 Web 應用程式的表單驗證服務。Manages forms-authentication services for Web applications. 這個類別無法被繼承。This class cannot be inherited.

FormsAuthenticationEventArgs

提供資料給 FormsAuthentication_OnAuthenticate 事件。Provides data for the FormsAuthentication_OnAuthenticate event. 此類別無法被繼承。This class cannot be inherited.

FormsAuthenticationModule

在啟用表單驗證時,設定 ASP.NET 應用程式的使用者識別。Sets the identity of the user for an ASP.NET application when forms authentication is enabled. 此類別無法被繼承。This class cannot be inherited.

FormsAuthenticationTicket

提供存取票證之屬性和值的權限,票證是搭配表單驗證使用,以識別使用者。Provides access to properties and values of the ticket used with forms authentication to identify users. 這個類別無法被繼承。This class cannot be inherited.

FormsIdentity

表示使用表單驗證的已驗證使用者識別。Represents a user identity authenticated using forms authentication. 這個類別無法被繼承。This class cannot be inherited.

MachineKey

提供將資料進行加密或雜湊 (或兩者都進行) 的方法,採用 ASP.NET 表單驗證和檢視狀態所使用的相同演算法和金鑰值。Provides a way to encrypt or hash data (or both) by using the same algorithms and key values that are used for ASP.NET forms authentication and view state.

Membership

驗證使用者認證,並管理使用者設定。Validates user credentials and manages user settings. 這個類別無法被繼承。This class cannot be inherited.

MembershipCreateUserException

當成員資格提供者未成功建立使用者時,所擲回的例外狀況。The exception that is thrown when a user is not successfully created by a membership provider.

MembershipPasswordAttribute

驗證密碼欄位是否符合成員資格提供者的目前密碼需求。Validates whether a password field meets the current password requirements for the membership provider.

MembershipPasswordException

無法從密碼存放區擷取密碼時,所擲回的例外狀況。The exception that is thrown when a password cannot be retrieved from the password store.

MembershipProvider

使用自訂成員資格提供者來定義 ASP.NET 實作用以提供成員資格服務的合約。Defines the contract that ASP.NET implements to provide membership services using custom membership providers.

MembershipProviderCollection

繼承 MembershipProvider 抽象類別的物件之集合。A collection of objects that inherit the MembershipProvider abstract class.

MembershipUser

公開及更新成員資格資料存放區中的成員資格使用者資訊。Exposes and updates membership user information in the membership data store.

MembershipUserCollection

MembershipUser 物件的集合。A collection of MembershipUser objects.

PassportAuthenticationEventArgs

事件引數,由 Authenticate 傳遞至 PassportAuthenticationModule 事件。The event argument passed to the Authenticate event by a PassportAuthenticationModule. 既然在這個時候已經有識別 (Identity),這將主要有助於使用所提供的識別將自訂的 IPrincipal 物件附加至內容。Since there is already an identity at this point, this is useful mainly for attaching a custom IPrincipal object to the context using the supplied identity. 這個類別已被取代。This class is deprecated.

PassportAuthenticationModule

提供 Passport 驗證服務周圍的包裝函式。Provides a wrapper around Passport Authentication services. 這個類別無法被繼承。This class cannot be inherited. 這個類別已被取代。This class is deprecated.

PassportIdentity

提供 PassportAuthenticationModule 所使用的類別。Provides a class to be used by PassportAuthenticationModule. 它提供應用程式存取 Ticket(String) 方法的方式。It provides a way for an application to access the Ticket(String) method. 這個類別無法被繼承。This class cannot be inherited. 這個類別已被取代。This class is deprecated.

PassportPrincipal

表示密碼驗證的原則。Represents a Passport-authenticated principal. 這個類別已被取代。This class is deprecated.

RoleManagerEventArgs

提供 GetRoles 類別之 RoleManagerModule 事件的事件資料。Provides event data for the GetRoles event of the RoleManagerModule class.

RoleManagerModule

管理目前使用者的 RolePrincipal 執行個體。Manages a RolePrincipal instance for the current user. 這個類別無法被繼承。This class cannot be inherited.

RolePrincipal

表示目前 HTTP 要求的安全性資訊,包括角色成員資格。Represents security information for the current HTTP request, including role membership. 這個類別無法被繼承。This class cannot be inherited.

RoleProvider

定義合約,由 ASP.NET 實作,使用自訂角色提供者來提供角色管理服務。Defines the contract that ASP.NET implements to provide role-management services using custom role providers.

RoleProviderCollection

繼承 RoleProvider 抽象類別的物件集合。A collection of objects that inherit the RoleProvider abstract class.

Roles

管理角色中的使用者成員資格,以在 ASP.NET 應用程式中執行授權檢查。Manages user membership in roles for authorization checking in an ASP.NET application. 這個類別無法被繼承。This class cannot be inherited.

SqlMembershipProvider

在 SQL Server 資料庫中,管理 ASP.NET 應用程式成員資格資訊的存放。Manages storage of membership information for an ASP.NET application in a SQL Server database.

SqlRoleProvider

在 SQL Server 資料庫中,管理 ASP.NET 應用程式的角色成員資格資訊儲存區。Manages storage of role membership information for an ASP.NET application in a SQL Server database.

UrlAuthorizationModule

驗證使用者確實擁有權限,可以存取所要求的 URL。Verifies that the user has permission to access the URL requested. 這個類別無法被繼承。This class cannot be inherited.

ValidatePasswordEventArgs

提供 ValidatingPassword 類別之 MembershipProvider 事件的事件資料。Provides event data for the ValidatingPassword event of the MembershipProvider class.

WindowsAuthenticationEventArgs

提供 WindowsAuthentication_OnAuthenticate 事件的資料。Provides data for the WindowsAuthentication_OnAuthenticate event. 此類別無法被繼承。This class cannot be inherited.

WindowsAuthenticationModule

在啟用 Windows 驗證 (Authentication) 時,設定 ASP.NET 應用程式的使用者識別。Sets the identity of the user for an ASP.NET application when Windows authentication is enabled. 這個類別無法被繼承。This class cannot be inherited.

WindowsTokenRoleProvider

從 Windows 群組成員資格取得 ASP.NET 應用程式的角色資訊。Gets role information for an ASP.NET application from Windows group membership.

列舉

ActiveDirectoryConnectionProtection

指定 ActiveDirectoryMembershipProvider 類別 (Class) 支援的連接保護選項。Specifies the connection protection options supported by the ActiveDirectoryMembershipProvider class.

CookieProtection

描述如何保護 Cookie 中的資訊。Describes how information in a cookie is protected.

MachineKeyProtection

指定值,表示資料應該加密或解密,雜湊式訊息驗證碼 (HMAC) 應該附加或驗證,或兩者。Specifies values that indicates whether data should be encrypted or decrypted, whether a hash-based message authentication code (HMAC) should be appended or validated, or both.

MembershipCreateStatus

說明 CreateUser(String, String) 作業的結果。Describes the result of a CreateUser(String, String) operation.

MembershipPasswordFormat

描述用於儲存成員資格使用者密碼的加密格式。Describes the encryption format for storing passwords for membership users.

委派

AnonymousIdentificationEventHandler

代表處理 AnonymousIdentificationModuleAnonymousIdentification_Creating 事件的方法。Represents the method that handles the AnonymousIdentification_Creating event of a AnonymousIdentificationModule.

DefaultAuthenticationEventHandler

表示處理 DefaultAuthenticationModuleDefaultAuthentication_OnAuthenticate 事件的方法。Represents the method that handles the DefaultAuthentication_OnAuthenticate event of a DefaultAuthenticationModule.

FormsAuthenticationEventHandler

表示處理 FormsAuthenticationModuleFormsAuthentication_OnAuthenticate 事件的方法。Represents the method that handles the FormsAuthentication_OnAuthenticate event of a FormsAuthenticationModule.

MembershipValidatePasswordEventHandler

代表將處理 MembershipProvider 類別的 ValidatingPassword 事件之方法。Represents the method that will handle the ValidatingPassword event of the MembershipProvider class.

PassportAuthenticationEventHandler

代表處理 PassportAuthenticationModulePassportAuthentication_OnAuthenticate 事件的方法。Represents the method that handles the PassportAuthentication_OnAuthenticate event of a PassportAuthenticationModule. 這個類別已被取代。This class is deprecated.

RoleManagerEventHandler

GetRoles 類別的 RoleManagerModule 事件定義委派。Defines the delegate for the GetRoles event of the RoleManagerModule class.

WindowsAuthenticationEventHandler

代表處理 WindowsAuthenticationModuleWindowsAuthentication_OnAuthenticate 事件的方法。Represents the method that handles the WindowsAuthentication_OnAuthenticate event of a WindowsAuthenticationModule.

備註

Membership類別可由 ASP.NET 應用程式來驗證使用者認證及管理使用者設定,例如密碼和電子郵件地址。The Membership class is used by ASP.NET applications to validate user credentials and manage user settings such as passwords and email addresses. Roles類別可讓您管理您的 Web 應用程式中的角色指派的使用者群組為基礎的應用程式的授權。The Roles class enables you to manage authorization for your application based on groups of users assigned to roles in the Web application.

這兩個Membership類別和Roles類別工作提供者,存取您的應用程式資料存放區擷取成員資格和角色資訊的類別。Both the Membership class and the Roles class work with providers, classes that access your application's data store to retrieve membership and role information. 成員資格和角色的資訊可以儲存在 Microsoft SQL Server 資料庫,使用SqlMembershipProviderSqlRoleProvider類別; 中使用 Active DirectoryActiveDirectoryMembershipProviderAuthorizationStoreRoleProvider類別,或自訂資料來源中使用的實作MembershipProviderRoleProvider類別。Membership and role information can be stored in a Microsoft SQL Server database using the SqlMembershipProvider and SqlRoleProvider classes; in an Active Directory using the ActiveDirectoryMembershipProvider and AuthorizationStoreRoleProvider classes, or in a custom data source using implementations of the MembershipProvider and RoleProvider classes.

您設定 ASP.NET 成員資格使用項目 (ASP.NET 設定結構描述) 的成員資格You configure ASP.NET membership using the membership Element (ASP.NET Settings Schema). 存取使用成員資格的應用程式時,ASP.NET 建立的執行個體Membership類別,您可以使用查詢成員資格資訊。When an application using membership is accessed, ASP.NET creates an instance of the Membership class that you can use to query membership information. 提供者特定實作MembershipUser類別包含使用者存取頁面的相關資訊。Provider-specific implementations of the MembershipUser class contain information about the user accessing the page. 您可以建立的自訂實作MembershipUser您應用程式類別。You can create custom implementations of the MembershipUser class for your application.

您將使用 ASP.NET 角色設定roleManager 項目 (ASP.NET 設定結構描述)You configure ASP.NET roles using the roleManager Element (ASP.NET Settings Schema). ASP.NET 建立的執行個體Roles類別,其中包含目前使用者的角色成員資格的相關資訊。ASP.NET creates an instance of the Roles class that contains information about the role membership of the current user.

ASP.NET 提供伺服器控制項的互動Membership類別和Roles類別。ASP.NET provides server controls that interact with the Membership class and the Roles class. LoginCreateUserWizard,並ChangePassword控制項使用Membership類別,以簡化建立已驗證的 Web 應用程式和LoginView控制項會用來為特定群組自訂網頁的特定角色範本使用者。The Login, CreateUserWizard, and ChangePassword controls work with the Membership class to simplify creating an authenticated Web application, and the LoginView control uses role-specific templates to customize Web pages for specific groups of users.