Posted on: 10/20/2013 10:49:08 PM | Views : 845

I have an ASP.NET 4.5 application that allows anonymous profiles using the standard SqlProfileProvider.  I am trying to write a simple function to purge inactive anonymous profiles.  However, no profiles are ever deleted - even though I know there are some.  Here is my purging code:
// Work out the start date of inactivity var purgeBefore = DateTime.Now.AddDays(-7); // Delete all profiles inactvie since that date. var count = ProfileManager.DeleteInactiveProfiles(ProfileAuthenticationOption.Anonymous, purgeBefore); This is the configuration of the profile provider in my Web.Config file:
<providers>
 <clear/>
 <add name= Go to the complete details ...