ProfileProvider.DeleteInactiveProfiles Method
Assembly: System.Web (in system.web.dll)
public: virtual int DeleteInactiveProfiles ( ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate ) abstract
public abstract int DeleteInactiveProfiles ( ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate )
public abstract function DeleteInactiveProfiles ( authenticationOption : ProfileAuthenticationOption, userInactiveSinceDate : DateTime ) : int
Not applicable.
Parameters
- authenticationOption
One of the ProfileAuthenticationOption values, specifying whether anonymous, authenticated, or both types of profiles are deleted.
- userInactiveSinceDate
A DateTime that identifies which user profiles are considered inactive. If the LastActivityDate value of a user profile occurs on or before this date and time, the profile is considered inactive.
Return Value
The number of profiles deleted from the data source.The DeleteInactiveProfiles method is used to remove unused profile data from the data source. Only data for the applicationName specified in the configuration file is removed. The authenticationOption parameter specifies whether only anonymous profiles, only authenticated profiles, or all profiles are searched. Profiles in which the LastActivityDate occurs on or before the specified userInactiveSinceDate parameter value are deleted.
The following code example shows the method signature for an implementation of the DeleteInactiveProfiles method. For an example of a full ProfileProvider implementation, see Sample Profile Provider Implementation.
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.