Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

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:

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

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) {
        base.OnLoggedOn(args);
        AuditTrailModule auditTrailModule = this.Modules.FindModule<AuditTrailModule>();
        if(Security.UserName == "John")
            auditTrailModule.Enabled = false;
        }
    }
}