Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auditing with C# and .NET

I have a web application, and I would like to audit most of the users actions on the application, for example login, insertion to db, update to db, fired exceptions, etc.

One of my senios suggested using a queue for faster performance, so you just enqeue an event and it is then processed automatically without having to wait for it to be processed.

What are your suggestions? How should I process them? Enqueueing them is no problem, but I'm not sure how they will be processed then without no body calling a method.

I am using C# with .NET 4.0

like image 947
Ryan S Avatar asked Aug 02 '11 12:08

Ryan S


People also ask

How many questions are there in the Usaudit C questionnaire?

The AUDIT-C has 3 questions and is scored on a scale of 0-12. Each AUDIT-C question has 5 answer choices valued from 0 points to 4 points. In men, a score of 4 or more is considered positive, optimal for identifying hazardous drinking or active alcohol use disorders.

How often do you drink alcohol questionnaire?

1) How often do you have a drink containing alcohol? 2) How many drinks containing alcohol do you have on a typical day when you are drinking? 3) How often do you have 5 or more drinks on one occasion? 4) How often during the last year have you found that you were not able to stop drinking once you had started?

What is the tweak assessment?

(Tolerance, Worried, Eye-opener, Amnesia, K-Cut Down) Description: The TWEAK screening test consists of five questions designed to screen pregnant women for harmful drinking habits. The tool consists of questions from the CAGE as well as the MAST, regarding tolerance and amnesia.

How is harmful drinking categorized for males?

For men, consuming more than 4 drinks on any day or more than 14 drinks per week. For women, consuming more than 3 drinks on any day or more than 7 drinks per week.


2 Answers

I've been working on a library that can probably help.

Audit.NET and its extensions to audit different systems (WCF, MVC, WebApi, EF) and store logs in different data storages (SQL, MongoDB, DocumentDB, File, EventLog) will give you the flexibility to configure what do you want to audit and where do you want to store the audit logs.

like image 196
thepirat000 Avatar answered Sep 20 '22 15:09

thepirat000


I would simply recommend an off the shelf logging framework that is stable and supported. Have you considered a logging framework, like log4net?

You could write a custom appender for logging into MSMQ if you'd like.

like image 24
Armbrat Avatar answered Sep 21 '22 15:09

Armbrat