title: Audit.NET.MVC not logging on exception
body: <p>audit.net.mvc is not creating the json file when an unhandled exception occurs. what do i need to configure?</p>
  
  <pre><code>public class HomeController : Controller
  {
      public ActionResult About()
      {
          ViewBag.Message = "Your application description page.";
  
          var a = 10;
          var b = 0;
          var c = a / b;
  
          return View();
      }
  }
  </code></pre>
  
  <p><strong>Update:</strong>
  My code configuration</p>
  
  <p>FilterConfig.cs</p>
  
  <pre><code>    {
          public static void RegisterGlobalFilters(GlobalFilterCollection filters)
          {
              filters.Add(new HandleErrorAttribute());
  
              filters.Add(new Audit.Mvc.AuditAttribute()
              {
                  IncludeHeaders = true,
                  IncludeRequestBody = true,
                  EventTypeName = "{verb} {controller}/{action}"
              });
          }
      }
  </code></pre>
  
  <p>Global.asax</p>
  
  <pre><code>protected void Application_Start()
          {
              AreaRegistration.RegisterAllAreas();
              FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
              RouteConfig.RegisterRoutes(RouteTable.Routes);
              BundleConfig.RegisterBundles(BundleTable.Bundles);
  
              Audit.Core.Configuration.Setup()
              .UseFileLogProvider(config =&gt; config
                  .DirectoryBuilder(_ =&gt; $@"C:\temp\Logs\{DateTime.Now:yyyy-MM-dd}")
                  .FilenameBuilder(auditEvent =&gt; $"{auditEvent.Environment.UserName}_{DateTime.Now.Ticks}.json"));
          }
  </code></pre>
  
  <p>just remembering that when there is no exception, it works</p>
  
  <p>Thanks</p>