 |
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0  | This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

July 31st, 2006, 06:34 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Routine Maintenance
I haven't been watching my site closely because it's just a demo site for the book, but I noticed today that there's a big build-up of records in the aspnet_profile and aspnet_users tables. This is caused by the way we're tracking anonymous users - we never clear out those entries and the tables keep getting bigger.
So, as a part of the routine maintenace of the site, these anonymous records should be purged periodically (maybe once a month). This SQL will do that:
delete from aspnet_profile
where userid in
(select userid from aspnet_users where isanonymous = 1)
go
delete from aspnet_users where isanonymous = 1
go
And, of course, if you have set up any Custom Web Events, you'll need to purge that table also.
Eric
|
|

October 17th, 2006, 06:57 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
This is an update to the above SQL. Instead of deleting ALL anonymous users, it might be better to delete only the ones who haven't returned to your site in the last 60 days (or 30, or whatever number you like):
delete from aspnet_profile
where userid in
(select userid from aspnet_users
where isanonymous = 1
and datediff(dd, LastActivityDate, getdate()) > 60)
go
delete from aspnet_users
where isanonymous = 1
and datediff(dd, LastActivityDate, getdate()) > 60
go
And don't forget about the aspnet_WebEvent_Events table! I removed the healthMonitoring section from my web.config because I wasn't actually looking at the events, anyway. But this kind of monitoring can be good if you intend to keep up with it, and purge that table occasionally.
Eric
|
|

October 17th, 2006, 07:35 PM
|
|
Authorized User
|
|
Join Date: Aug 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks.
|
|

October 20th, 2006, 12:25 PM
|
|
Friend of Wrox
|
|
Join Date: Aug 2006
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
great.. thanks man
www.clubvwnica.com
|
|

November 14th, 2006, 04:12 PM
|
|
Friend of Wrox
|
|
Join Date: Aug 2006
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
is it ok to delete all data from aspnet_WebEvent_Events?
|
|

November 15th, 2006, 10:21 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
yes, you can delete the events. They're only there to tell you what happened. Think of it as an audit trail that can also help you debug problems.
|
|

December 7th, 2006, 01:21 PM
|
|
Registered User
|
|
Join Date: Dec 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
|

December 11th, 2006, 03:17 PM
|
|
Friend of Wrox
|
|
Join Date: Aug 2006
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
thanks
|
|

December 12th, 2006, 11:37 AM
|
|
Friend of Wrox
|
|
Join Date: Aug 2006
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
|
|
Hi,
isn't the anonymous tracking used to check if for instance an anonymous user already voted ?
is there any manual on doing maintenance on the site ?
koen
|
|

May 2nd, 2009, 04:07 AM
|
|
Authorized User
|
|
Join Date: Jul 2006
Posts: 13
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by vantoko
Hi,
isn't the anonymous tracking used to check if for instance an anonymous user already voted ?
|
The votes are stored in cookies with expiration settings here:
<ConfigurationProperty("ratingLockInterval", DefaultValue:="15")>
|
|
 |