Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm using auditing functionality in my SharePoint site and I notice today that, through the results retrieved programatically by my SPAuditQuery object, my auditing count is mostly wrong because of multiple similar entries that appear (more than one time) in the generated xml file.

You can find for example, when a user load my site's homepage, 3 entries like "pages/default.aspx". even if the user arrives for the first time on the homepage and he never reloads the page. Sometimes I have 4 entries. So it's a very unpredictable behaviour !

How can I proceed if I want to have the correct count ? Does anyone have an idea ?

thanks

share|improve this question
add comment

2 Answers 2

up vote 0 down vote accepted

What exactly are you auditing? Be aware that auditing doesnt work on list items (by design) and is broken on publishing pages.

If you are just looking for general web analytics, i strongly recommend using another way of logging usage, such as javascript on pages (wont work for documents though).

If you do need users etc, consider creating a custom web control that creates a custom SPAuditEntry.

Check out my post on SO: http://stackoverflow.com/questions/921509/how-to-create-a-daily-summary-alert-for-any-change-in-a-sharepoint-site

Example on creating custom audit entries http://msdn.microsoft.com/en-us/library/bb397403.aspx#MOSS2007ItemLevelAudit_WritingCustomAuditEntries

share|improve this answer
add comment

I finally created a custom audit entry. It's quite simple to implement.

Thank you for your helpful msdn link. Now it works better.

Rivo

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.