This really is in regards to a simple yet efficient activity logging framework that I wish to integrate with my existing ASP.Internet based web-application (I have a LINQ-to-SQL based SQL DB as after sales). I am using something similar to something-architecture to do DB procedures - that's invoke relevant LINQ procedures. I have something class for nearly every entity (i.e. DB table) also it handles the CRUD procedures.

Generally, I have to track activities like - Mr.X added a brand new Item, My.Y looked about this filter, Mr.Z released caused by Power grid for an stand out document, etc... and other alike simple operation based logging (area-level logging is way for the time being)

So, this is what I have present in my 2 days of R&D around the SO, other forums and also the web:

Approach 1: Simple old method of using two tables: Activity (stores All of the activities together with its actor) &lifier ActivityType (lists kinds of activities). I have something layer so either I may have a "ServieBase" class which taps All of the CRUD occasions and logs the main one by which I am interested. Things are handled from inside the code.

Example: http://dotnetslackers.com/articles/aspnet/Tracking-User-Activity.aspx

Approach 2: Use database TRIGGERs to tap occasions at table level after which perform logging. This is completely 'abstract' towards the application. I have "LastModifiedBy" area in every table so I'll obtain the 'actor' data and that i can perform the logging but this may limit me to DB-procedures &lifier need me to trace other application-activities individually. but when its worth I'm able to contemplate it.

Approach 3: (conceptual, require more guidance)

3.1 MVC approach - We are considering implementing MVC later on and I have found some efficient logging methods in MVC like - (is ther anything like this for traditional L2S based web-application?)

http://stackoverflow.com/questions/1822754/log-user-activity-on-asp-net-mvc-application http://stackoverflow.com/questions/1514616/track-user-activity-actions-for-an-asp-net-mvc-website

3.2 Monitoring Services I discovered a 'tracking service' feature in home windows - can there be its web-equivalent?

http://msdn.microsoft.com/en-us/magazine/cc163466.aspx http://www.codeproject.com/KB/WF/WWF%5F%5FTracking%5FService.aspx?msg=2879654

3.3 Misc - Another options that we discovered try not to appear too convincing or I'd better say they work although not mine :-)

Ref -

http://learn.iis.net/page.aspx/480/sample-web-analytics-tracking-module/

SQL Profiler: http://articles.techrepublic.com.com/5100-10878%5F11-5054787.html http://technet.microsoft.com/en-us/library/cc966515.aspx

So, what say? Any suggestions and new ideas are welcome. For the time being, it appears I'd land approximately the very first-two approaches because we would like it to be simple later on to have the ability to add any other activity to become drenched.

Thanks.

Here's another item to increase your toolkit: Sql Server Change Tracking. However it will not fit everything in you are searching for here. You may have a look in the Command pattern. I'd create an interface, ITrackedCommand, after which implement individuals because the instructions the user are capable of doing. Then, each is performed via a command dispatcher which instantly calls ITrackedCommand.Log. I believe which will enable you to get where you have to go.