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

Audit.NET - Entity Framework - Log Based on Business Action using AuditScope

I'm in the process of implementing Auditing with Audit.NET and Entity Framework with an MVC application running .NET 4.6.1. I'd like to be able to audit certain business actions that affect multiple entities while not auditing every modification to…
Billy Rudasill
  • 105
  • 2
  • 11
1
vote
2 answers

Audit.NET - Entity Framework - Filter audit events based on Action

I'm in the process of implementing Auditing with Audit.NET and Entity Framework with an MVC application running .NET 4.6.1. I have a requirement to be able to restrict auditing based on the database operation being performed. I've reviewed the…
Billy Rudasill
  • 105
  • 2
  • 11
1
vote
2 answers

Audit.NET - Entity Framework - How to Implement OptOut

I'm in the process of implementing Auditing with Audit.NET and Entity Framework with an MVC application running .NET 4.6.1. I was able to configure auditing via startup so that it captures audit information and logs it to a custom AuditLog table…
Billy Rudasill
  • 105
  • 2
  • 11
1
vote
1 answer

How to include specific property to changes part Audit.Net

I have two primary columns and its set by with HasKey (fluent API .net core) When I tried to update a record from the table all columns have an old and new value in changes. but not the primary key. I need these primary key filed in changes is there…
Mehaboob
  • 121
  • 2
  • 12
1
vote
1 answer

Ignore certain entities from auditing and Transaction Id does not work

I am using Audit.Net for generating audit logs in my entity framework core project where I use Database First Approach. While I am able to get some promising results I have a few question: While using AuditTypNameMapper is there a way to ignore…
007
  • 21
  • 3
1
vote
1 answer

Can I configure Audit.NET to create audit records in two tables on for one audit event?

I am currently implementing Audit.NET into an ASP.NET Core Web API project that is using EF Core. I am using the Entity Framework Data Provider and currently have it configured to map all entities to a single audit log (AuditLog) table with the code…
rag9
  • 484
  • 1
  • 5
  • 17
1
vote
1 answer

Audit.NET.MVC not logging on exception

audit.net.mvc is not creating the json file when an unhandled exception occurs. what do i need to configure? public class HomeController : Controller { public ActionResult About() { ViewBag.Message = "Your application description…
1
vote
1 answer

Unable to configure SqlDataProvider in Audit.Net when MVC multiple layered application

I have web project using ASP.Net MVC. And, project structure is Libraries Core Data (I have used AuditScope to capture audit events to store them in sql that configured in web) Services Presentation Web (I have a configuration class to use…
Balagurunathan Marimuthu
  • 2,927
  • 4
  • 31
  • 44
1
vote
1 answer

Don't include Environment in serialised AuditEvents

In the Environment property of Audit.NET's output none of the properties (DomainName, MachineName, etc) are really useful to us and take a lot of extra space in our audit database. To remove them I've found I can either do…
x5657
  • 1,172
  • 2
  • 13
  • 26
1
vote
0 answers

How to include a Custom field into Audit.EntityFramework?

I'm using Audit.EntityFramework.Core, where I implement Auditing by Using DbContextHelper,IAuditDbContext and Overriding SaveChanges() and SaveChangesAsync() methods, Instead of inheriting AuditDbContext. public partial class MyContext: DbContext { …
Shriram Navaratnalingam
  • 2,847
  • 2
  • 15
  • 20
1
vote
1 answer

Redacting Log Content

In Audit.Net, is it possible to filter request bodies being saved containing sensitive data? This is for Audit.WebAPI. E.g., There's a JSON request body with {"username": "me", "password": "sensitive"}. Can the password value "sensitive" be replaced…
Richard
  • 603
  • 5
  • 14
1
vote
1 answer

Does the DbContextHelper.SaveChanges() method carry out the SaveScope() asynchronously after performing baseSaveChanges()?

I do want to clarify whether SaveScope() in the AuditContext is carried out asynchronously after base.SaveChages() in-order to avoid normal operation getting blocked???? If not is any way implement that requirement.....???
Shriram Navaratnalingam
  • 2,847
  • 2
  • 15
  • 20
1
vote
1 answer

Audit.Net:Setup().ForContext() results in no entities being mapped

Configuring Audit.EntityFramework with the below configuration (part of Audit.Net) does not result in the proper mapping of entities. Audit.EntityFramework.Configuration.Setup().ForContext().UseOptOut(); The method public…
1
vote
1 answer

Why can't I use ApplyConfiguration() to add my audit log table (Audit.NET can't find it)?

I have an existing application that is built on Entity Framework Core 2.2.x. It is using modelBuilder.ApplyConfiguration() to associate entities with the data model dynamically. This works for all of the current entities and even my new AuditLog…
wildbagel
  • 145
  • 8
1
vote
1 answer

Audit.NET CustomFields keeping value between requests

I tried to use these two ways to write a customfield and it is recording correctly, but it is keeping customfields between requests public class LoggerAudit : ILoggerAudit { public void AddOnSavingAction(string key, object value) { …
1 2 3
8 9