Audit Data

Audit Data

Old forum URL: forums.lhotka.net/forums/t/40.aspx


Gigatron posted on Tuesday, May 09, 2006

I have a need to store audit data for all data modifications, such as User, IP Address, Application ID, etc.  This needs to be passed in to all my stored procs, so this will need to be in all my DataPortal methods.  What do you think would be the best way to share this data between all my business objects?  I was thinking I may need to create a custom Membership provider to store this additional information, that way I can just use the User context to pull this information.

guyroch replied on Tuesday, May 09, 2006

That kind of data is usally static for one given user session/login.  For this reason, it makes perfect sense to store that info in your IIdentity/IPrincipl pair  implementation.  This way you only have to set it up at login time.  Then you can access that info anywhere in you app, including the DataPortal_XYZ methods.

I've done similar stuff this way in the past and it worked out great.  I would definetly extend the IIdentity before introducing a membership provider if that is all you are looking for.

Copyright (c) Marimer LLC