Remove anonymous users from ASP.Net Membership tables

If you use the ASP.Net membership tools, have <anonymousIdentification enabled=”true” /> specified in your Web.config, and get lots of anonymous visitors, it’s only a matter of time before your database grows. What’s filling it up is the countless user records for your anonymous users.

If you don’t need to track user and profile information for an anonymous user once they leave the site, you can delete the unneeded data by running a SQL script. The following script will delete from your membership tables all anonymous users whose last activity was more than 7 days ago.

delete from aspnet_profile
where userid in ( select userid from aspnet_users
where isanonymous = 1
and datediff(dd, lastactivitydate, getdate()) &gt; 7
)

delete from aspnet_usersinroles
where userid in ( select userid from aspnet_users
where isanonymous = 1
and datediff(dd, lastactivitydate, getdate()) &gt; 7
)

delete from aspnet_membership
where userid in ( select userid from aspnet_users
where isanonymous = 1
and datediff(dd, lastactivitydate, getdate()) &gt; 7
)

delete from aspnet_personalizationperuser
where userid in ( select userid from aspnet_users
where isanonymous = 1
and datediff(dd, lastactivitydate, getdate()) . . .

→ Read More: Remove anonymous users from ASP.Net Membership tables

Deleting all tables and constraints in a database

We all need to do it from time to time — erase a bunch of tables in a SQL database. Sure, you can do this through Enterprise Manager, one table at a time, or write a bunch of DROP TABLE statements, but when doing it this way, you also need to ensure all foreign key constraints (i.e. table dependencies) are dropped first.

There’s an easier way — the following script, which was derived from a few posts scattered around the Internet. (Sorry, it’s been a while, and I don’t remember what they were!)

. . . → Read More: Deleting all tables and constraints in a database

Downloading Age of Conan without the DVDs (good for buddy keys)

[I'm not sure if this is widely known, but I just figured it out and figured I'd share it here.]

Funcom recently activated the buddy program for their MMO, Age of Conan, allowing active subscribers to give a friend a game key which permits 7 days of play time. However, Funcom’s solution to giving your buddy the client software isn’t as smooth.

We recommend that you lend your install DVDs to your buddy to get him or her ready to play as fast as possible. Alternatively your buddy will be offered a $2,99/€2,99 client download with 3 additional days of playtime to cover the download time.

The install media Age of Conan (of which ComputerSims developed a fansite for, AOChub) is two 6GB DVDs. Sure, you can send your buddy your DVDs… or burn ISOs of them and let him download all 12+GB of them… Or you can do this:

Send your buddy a copy of ConanPatcher.exe and LocalConfig.xml.
Have your . . .

→ Read More: Downloading Age of Conan without the DVDs (good for buddy keys)