asp.net-mvcloggingaudit-trailaudit-logginguser-activity

Log User Activity on ASP.NET MVC Application


Is there A good strategy to Log the User activity on an ASP MVC App? (ActionFilters/ HTTPModules).

Something like last user activity (just like StackOverflow "Seen 23 mins ago"), and even what Pages and Controllers were used, and pushing even further what buttons or links were clicked.

I have ELMAH installed but as far as i know its just for Error Logging.

PD: Google Analytics is not an option.


Solution

  • You could try using a PostSharp aspect to perform the logging for you, it's multi-cast functionality might come in handy for something like that. If it's not an option, then a Module would probably be the easiest to implement (assuming you can get the required user information at that point in the pipeline).