Questions tagged [audit.net]

An extensible framework to audit executing operations in .NET

An extensible framework to audit executing operations in .NET including support for .NET Framework 4.5 and Net Core.

With Audit.NET you can generate tracking information about operations being executed. Logs environmental information such as the caller user id, machine name, method name, exceptions, including execution time and duration.

Extensions to log to json Files, Event Log, SQL, MySQL, MongoDB, AzureBlob, PostgreSQL, Redis, Elasticsearch and CosmosDB are provided. And also extensions to audit different systems such as EntityFramework, MVC, WebAPI, SignalR and WCF.

Project site

121 questions
1
vote
1 answer

How to create the audit database tables using Entity Framework Provider?

I'm trying to implement Audit.Net with Entity Framework, I need to create an audit table for each of my current tables and add some fields. Do I have to create all the audit entities like my actual ones and add a Migration to create it all in…
1
vote
1 answer

Audit.Net: add customfields

I am new to the use of audit.net. I need to audit a series of custom values from the parameters received in the action method as follows. [AuditField("User","reqLogin.User")] [AuditCustom(EventTypeName = "AccesoAction")] public…
1
vote
1 answer

Is it possible to use Audit.Net with httpClient to capture external requests

Using Audit.Net is it possible to create an audit scope for httpClient requests, in a similar way to the MVC.Core or WebAPI.Core Middleware? I've tried something like this but not having much success, generally it'll timeout the app. AuditScope…
Bert McKay
  • 26
  • 1
  • 5
1
vote
1 answer

Audit.Net - different types of objects - how to make generic?

I am using Audit.Net, (which is an excellent utility) to start auditing a system that was not designed with auditing in mind. Audit.Net is a life-saver in this case. I assume someone must have had a similar scenario, and I'm asking this question…
Igavshne
  • 699
  • 7
  • 33
1
vote
1 answer

Get the AuditAction's Username property in derived AuditDataProvider

I am using Audit.Net and Audit.MVC 14.2.2.0. Great framework! I have extended the AuditDataProvider: public class SQLAuditDataProvider : AuditDataProvider In that class, I would like to get hold of the auditEvent's Action object, so that I can log…
Igavshne
  • 699
  • 7
  • 33
1
vote
1 answer

Add new column in Audit.WebAPI

I am writing Audit Log into postgres database using .net core. I am following article Audit.WebAPI. everything working fine. log write properly in database. My requirement is pass some other information while logging into database, but i am not able…
ANJYR
  • 2,583
  • 6
  • 39
  • 60
1
vote
1 answer

how to implement custom field with Audit.Net entityframework

I'm new to Audit.net. I successfully configure it in my project. But now, i need to extend it to save extra information like requesterID and a comment write on the view page. my case : Entity mapped to Entity_AT Entity { [Key] int ID …
JohnFI
  • 35
  • 5
1
vote
1 answer

AuditIgnore on part of from body

I have a method that returns saves a user to the identity table. I would like to audit to check who is creating the users but not audit the password. public async Task RegisterUser([FromBody]NewUser register) { //code for creation of…
theJ
  • 395
  • 5
  • 25
1
vote
1 answer

Save Audit.WebApi logs to a database

I am using Audit.WepApi (found here) with my .Net Core 2.2 application which is a Web API. I managed to configure it on my controllers using the default options. It is great for logging API calls which should hopefully add to the security…
theJ
  • 395
  • 5
  • 25
1
vote
1 answer

Audit.Net on Update inserts empty records for every value that is in the table

I am using Audit.Net EntityFramework data provider. This is my configuration in Startup.cs Audit.Core.Configuration.Setup().UseEntityFramework(_ => _.AuditTypeMapper(t => typeof(AuditLog)).AuditEntityAction((ev, entry, entity) => { …
nightowl
  • 309
  • 1
  • 3
  • 13
1
vote
1 answer

How is the first step to register Audit.Net in the "Startup.cs" of my application?

Audit.Net SomeBody can help me with one newbie question? How is the first step to register Audit.Net in the "Startup.cs" of my application? I'm try do audit with Entity FrameWrok focus one single table: But i don't know waht is the NameSpace for…
1
vote
0 answers

Audit.Net CodeFirst Migration Event Model creating

I am unable to create the exact model from the official sql query as model to run the exact migration and create the table with exact properties. CREATE TABLE [Event] ( [EventId] BIGINT IDENTITY(1,1) NOT NULL, [InsertedDate] DATETIME NOT…
nightowl
  • 309
  • 1
  • 3
  • 13
1
vote
1 answer

Audit.Net Entity Framework Provider: Save the DB operation before the audit log

I've been trying out the Audit.NET Entity Framework provider without using inheritance, outlined in https://github.com/thepirat000/Audit.NET/tree/master/src/Audit.EntityFramework#without-inheritance Is there a way to save the DB operations first,…
Check
  • 23
  • 1
  • 3
1
vote
0 answers

How to include a specific column (user ID) in the audit

I'm having doubts about how to implement user code in the audit table. The audit.net includes the name of the user connected to the database (example: sa) but I would also like to include the user ID of my system. I ran some tests reading the code…
1
vote
1 answer

Nested Async causes HttpContext Null

I have a WebAPI project which is using Entity Framework, and the following is the SaveChanges that I overrides to monitor timestamp & etc. I wonder why when I'm moved AddAuditCustomField into the child Method, HttpContext became null. I'm using…
AppeShopper
  • 265
  • 1
  • 2
  • 11
1 2 3
8 9