1 out of 1 rated this helpful - Rate this topic

ProfileProvider Class

Defines the contract that ASP.NET implements to provide profile services using custom profile providers.

Namespace:  System.Web.Profile
Assembly:  System.Web (in System.Web.dll)
public abstract class ProfileProvider : SettingsProvider

The ProfileProvider type exposes the following members.

  Name Description
Protected method ProfileProvider Initializes a new instance of the ProfileProvider class.
Top
  Name Description
Public property ApplicationName Gets or sets the name of the currently running application. (Inherited from SettingsProvider.)
Public property Description Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs). (Inherited from ProviderBase.)
Public property Name Gets the friendly name used to refer to the provider during configuration. (Inherited from ProviderBase.)
Top
  Name Description
Public method DeleteInactiveProfiles When overridden in a derived class, deletes all user-profile data for profiles in which the last activity date occurred before the specified date.
Public method DeleteProfiles(ProfileInfoCollection) When overridden in a derived class, deletes profile properties and information for the supplied list of profiles.
Public method DeleteProfiles(String[]) When overridden in a derived class, deletes profile properties and information for profiles that match the supplied list of user names.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method FindInactiveProfilesByUserName When overridden in a derived class, retrieves profile information for profiles in which the last activity date occurred on or before the specified date and the user name matches the specified user name.
Public method FindProfilesByUserName When overridden in a derived class, retrieves profile information for profiles in which the user name matches the specified user names.
Public method GetAllInactiveProfiles When overridden in a derived class, retrieves user-profile data from the data source for profiles in which the last activity date occurred on or before the specified date.
Public method GetAllProfiles When overridden in a derived class, retrieves user profile data for all profiles in the data source.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetNumberOfInactiveProfiles When overridden in a derived class, returns the number of profiles in which the last activity date occurred on or before the specified date.
Public method GetPropertyValues Returns the collection of settings property values for the specified application instance and settings property group. (Inherited from SettingsProvider.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Initialize Initializes the provider. (Inherited from ProviderBase.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method SetPropertyValues Sets the values of the specified group of property settings. (Inherited from SettingsProvider.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Top

ASP.NET profiles offer persistent storage and retrieval of user-specific properties. Profile property values and information are stored in a data source in a manner determined by the ProfileProvider implementation. You can use the profile providers that are included with the .NET Framework (represented by the classes that derive from the ProfileProvider abstract class), or you can implement your own provider by creating a new class that derives from ProfileProvider.

There are two primary reasons for creating a custom profile provider.

  • You need to store profile information in a data source that is not supported by the profile providers included with the .NET Framework, such as a FoxPro database, an Oracle database, or other data stores.

  • You need to manage profile information using a database schema that is different from the database schema used by the providers that ship with the .NET Framework. A common example of this would be user data that already exists in a SQL Server database for a company network or a Web site.

The ProfileProvider abstract class inherits from the SettingsProvider abstract class, which inherits from the ProviderBase abstract class. Classes that implement ProfileProvider must also implement the required members of the SettingsProvider and ProviderBase abstract classes. For more information about implementing a profile provider, see Implementing a Profile Provider.

For an example of a ProfileProvider implementation, see How to: Build and Run the Profile Provider Example.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ