Skip to main content
All docs

Disable the Audit Trail Module

This topic demonstrates two options you can use to disable the Audit Trail Module in your application:

In a Configuration File

Add the EnableAuditTrail key with the False value to an application’s configuration file, as shown below:

    <!-- ... -->
    <add key="EnableAuditTrail" value ="False"/>
    <!-- ... -->

In Application Code

Access the Audit Trail Module and specify its AuditTrailModule.Enabled property in the XafApplication.LoggedOn event handler, as shown below:

using DevExpress.ExpressApp.Win;
using DevExpress.ExpressApp.AuditTrail;
// ...
public class MySolutionWinApplication : WinApplication {
    // ...
    protected override void OnLoggedOn(LogonEventArgs args) {
        AuditTrailModule auditTrailModule = this.Modules.FindModule<AuditTrailModule>();
        if(Security.UserName == "John")
            auditTrailModule.Enabled = false;