Export (0) Print
Expand All
This topic has not yet been rated - 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.

  NameDescription
Protected methodProfileProviderInitializes a new instance of the ProfileProvider class.
Top
  NameDescription
Public propertyApplicationNameGets or sets the name of the currently running application. (Inherited from SettingsProvider.)
Public propertyDescriptionGets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs). (Inherited from ProviderBase.)
Public propertyNameGets the friendly name used to refer to the provider during configuration. (Inherited from ProviderBase.)
Top
  NameDescription
Public methodDeleteInactiveProfilesWhen overridden in a derived class, deletes all user-profile data for profiles in which the last activity date occurred before the specified date.
Public methodDeleteProfiles(ProfileInfoCollection)When overridden in a derived class, deletes profile properties and information for the supplied list of profiles.
Public methodDeleteProfiles(String[])When overridden in a derived class, deletes profile properties and information for profiles that match the supplied list of user names.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodFindInactiveProfilesByUserNameWhen 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 methodFindProfilesByUserNameWhen overridden in a derived class, retrieves profile information for profiles in which the user name matches the specified user names.
Public methodGetAllInactiveProfilesWhen 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 methodGetAllProfilesWhen overridden in a derived class, retrieves user profile data for all profiles in the data source.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetNumberOfInactiveProfilesWhen overridden in a derived class, returns the number of profiles in which the last activity date occurred on or before the specified date.
Public methodGetPropertyValuesReturns the collection of settings property values for the specified application instance and settings property group. (Inherited from SettingsProvider.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodInitializeInitializes the provider. (Inherited from ProviderBase.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSetPropertyValuesSets the values of the specified group of property settings. (Inherited from SettingsProvider.)
Public methodToStringReturns 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.

TopicLocation
Implementing a Profile ProviderBuilding ASP .NET Web Applications
Implementing a Profile ProviderBuilding ASP .NET Web Applications

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

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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.
Show:
© 2014 Microsoft. All rights reserved.