System.Web.Profile Namespace

System.Web.Profile 命名空间包含用于在 Web 服务器应用程序中处理 ASP.NET 用户配置文件的类。 The System.Web.Profile namespace contains classes that are used to work with ASP.NET user profiles in Web server applications.

CustomProviderDataAttribute

为配置文件属性的提供程序提供自定义数据的字符串。Provides a string of custom data to the provider for a profile property.

DefaultProfile

在未定义配置文件属性时表示用户配置文件实例。Represents a user-profile instance when no profile properties are defined.

ProfileAutoSaveEventArgs

ProfileAutoSaving 类的 ProfileModule 事件提供数据。Provides data for the ProfileAutoSaving event of the ProfileModule class.

ProfileBase

提供对配置文件属性值和信息的非类型化访问。Provides untyped access to profile property values and information.

ProfileEventArgs

Personalize 类的 ProfileModule 事件提供数据。Provides data for the Personalize event of the ProfileModule class.

ProfileGroupBase

提供对分组的 ASP.NET 配置文件属性值的非类型化访问。Provides untyped access to grouped ASP.NET profile property values.

ProfileInfo

提供关于用户配置文件的信息。Provides information about a user profile.

ProfileInfoCollection

ProfileInfo 对象的集合。A collection of ProfileInfo objects.

ProfileManager

管理用户配置文件数据和设置。Manages user profile data and settings.

ProfileMigrateEventArgs

MigrateAnonymous 类的 ProfileModule 事件提供数据。Provides data for the MigrateAnonymous event of the ProfileModule class.

ProfileModule

管理用户配置文件和配置文件事件的创建。Manages the creation of the user profile and profile events. 此类不能被继承。This class cannot be inherited.

ProfileProvider

定义 ASP.NET 为使用自定义配置文件提供程序提供配置文件服务而实现的协定。Defines the contract that ASP.NET implements to provide profile services using custom profile providers.

ProfileProviderAttribute

为用户配置文件属性标识配置文件提供程序。Identifies the profile provider for a user-profile property.

ProfileProviderCollection

继承 ProfileProvider 抽象类的对象的集合。A collection of objects that inherit the ProfileProvider abstract class.

SettingsAllowAnonymousAttribute

标识某个配置文件属性是否可由匿名用户设置或访问。Identifies whether a profile property can be set or accessed for an anonymous user.

SqlProfileProvider

对 ASP.NET 应用程序的配置文件信息在 SQL Server 数据库中的存储进行管理。Manages storage of profile information for an ASP.NET application in a SQL Server database.

枚举

ProfileAuthenticationOption

描述要搜索的用户配置文件的身份验证类型。Describes the authentication type of user profiles to be searched.

委托

ProfileAutoSaveEventHandler

表示将用来处理 ProfileAutoSavingProfileModule 事件的方法。Represents the method that will handle the ProfileAutoSaving event of a ProfileModule.

ProfileEventHandler

表示将用来处理 PersonalizeProfileModule 事件的方法。Represents the method that will handle the Personalize event of a ProfileModule.

ProfileMigrateEventHandler

表示将处理 ProfileModule 类的 MigrateAnonymous 事件的方法。Represents the method that will handle the MigrateAnonymous event of the ProfileModule class.

注解

ASP.NET 配置文件用于存储和检索数据源,如数据库中的用户设置。ASP.NET profiles are used to store and retrieve user settings in a data source such as a database. 通过使用配置文件提供程序管理配置文件信息和属性值。Profile information and property values are managed by using a profile provider. 可以通过 Microsoft SQL Server 数据库中存储的个人资料信息SqlProfileProvider类,或通过使用实现自定义数据源中ProfileProvider抽象类。Profile information can be stored in a Microsoft SQL Server database by using the SqlProfileProvider class, or in a custom data source by using an implementation of the ProfileProvider abstract class.

通过使用配置 ASP.NET 配置文件配置文件配置节。ASP.NET profiles are configured by using the profile configuration section.

ASP.NET 时已启用配置文件应用程序启动,创建新的类的类型ProfileCommon,后者又继承ProfileBase类。When an application starts that has profiles enabled, ASP.NET creates a new class of type ProfileCommon, which inherits from the ProfileBase class. 强类型化访问器添加到ProfileCommon中定义的每个属性的类配置文件配置节。Strongly typed accessors are added to the ProfileCommon class for each property that is defined in the profile configuration section. 实例ProfileCommon类设置的值为Profile属性与当前HttpContext对象。An instance of the ProfileCommon class is set as the value of the Profile property of the current HttpContext object. 可以创建自定义配置文件实现从继承ProfileBase抽象类,以及定义属性中未指定的用户配置文件配置文件配置元素。You can create a custom profile implementation that inherits from the ProfileBase abstract class and that defines properties for the user profile that are not specified in the profile configuration element.