ProfileProvider Class

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

NameDescription
System_CAPS_protmethodProfileProvider()

Initializes a new instance of the ProfileProvider class.

NameDescription
System_CAPS_pubpropertyApplicationName

Gets or sets the name of the currently running application.(Inherited from SettingsProvider.)

System_CAPS_pubpropertyDescription

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

System_CAPS_pubpropertyName

Gets the friendly name used to refer to the provider during configuration.(Inherited from ProviderBase.)

NameDescription
System_CAPS_pubmethodDeleteInactiveProfiles(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.

System_CAPS_pubmethodDeleteProfiles(ProfileInfoCollection)

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

System_CAPS_pubmethodDeleteProfiles(String[])

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

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodFindInactiveProfilesByUserName(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.

System_CAPS_pubmethodFindProfilesByUserName(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.

System_CAPS_pubmethodGetAllInactiveProfiles(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.

System_CAPS_pubmethodGetAllProfiles(ProfileAuthenticationOption, Int32, Int32, Int32)

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

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetNumberOfInactiveProfiles(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.

System_CAPS_pubmethodGetPropertyValues(SettingsContext, SettingsPropertyCollection)

Returns the collection of settings property values for the specified application instance and settings property group.(Inherited from SettingsProvider.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodInitialize(String, NameValueCollection)

Initializes the provider.(Inherited from ProviderBase.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodSetPropertyValues(SettingsContext, SettingsPropertyValueCollection)

Sets the values of the specified group of property settings.(Inherited from SettingsProvider.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

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
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft