Breyta

Deila með


ProfileProvider Class

Definition

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

public ref class ProfileProvider abstract : System::Configuration::SettingsProvider
public abstract class ProfileProvider : System.Configuration.SettingsProvider
type ProfileProvider = class
    inherit SettingsProvider
Public MustInherit Class ProfileProvider
Inherits SettingsProvider
Inheritance
Derived

Examples

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

Remarks

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.

Constructors

ProfileProvider()

Initializes a new instance of the ProfileProvider class.

Properties

ApplicationName

Gets or sets the name of the currently running application.

(Inherited from SettingsProvider)
Description

Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs).

(Inherited from ProviderBase)
Name

Gets the friendly name used to refer to the provider during configuration.

(Inherited from ProviderBase)

Methods

DeleteInactiveProfiles(ProfileAuthenticationOption, DateTime)

When overridden in a derived class, deletes all user-profile data for profiles in which the last activity date occurred before the specified date.

DeleteProfiles(ProfileInfoCollection)

When overridden in a derived class, deletes profile properties and information for the supplied list of profiles.

DeleteProfiles(String[])

When overridden in a derived class, deletes profile properties and information for profiles that match the supplied list of user names.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
FindInactiveProfilesByUserName(ProfileAuthenticationOption, String, DateTime, Int32, Int32, Int32)

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.

FindProfilesByUserName(ProfileAuthenticationOption, String, Int32, Int32, Int32)

When overridden in a derived class, retrieves profile information for profiles in which the user name matches the specified user names.

GetAllInactiveProfiles(ProfileAuthenticationOption, DateTime, Int32, Int32, Int32)

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.

GetAllProfiles(ProfileAuthenticationOption, Int32, Int32, Int32)

When overridden in a derived class, retrieves user profile data for all profiles in the data source.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetNumberOfInactiveProfiles(ProfileAuthenticationOption, DateTime)

When overridden in a derived class, returns the number of profiles in which the last activity date occurred on or before the specified date.

GetPropertyValues(SettingsContext, SettingsPropertyCollection)

Returns the collection of settings property values for the specified application instance and settings property group.

(Inherited from SettingsProvider)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
Initialize(String, NameValueCollection)

Initializes the configuration builder.

(Inherited from ProviderBase)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
SetPropertyValues(SettingsContext, SettingsPropertyValueCollection)

Sets the values of the specified group of property settings.

(Inherited from SettingsProvider)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also