title: NLog 5.0 with .net Framework 4.7.2 - aspnet request renderers are empty
body: <p>Using NLog 5.0, NLog.Web 5.0 and NLog.Database 5.0.  I am attempting to log the aspnet request variables as described in the documentation.  I log everything else just fine. Here is the code to setup the logger.  I also included the internal log file which I had set to Trace.</p>
  <pre><code> var config = new LoggingConfiguration();;
   DatabaseTarget dbTarget = new DatabaseTarget()
          {
              ConnectionString = connString,
              DBProvider = &quot;sqlserver&quot;,
              Name = &quot;database&quot;,
              CommandText = &quot;sp_insert_log&quot;,
              CommandType = System.Data.CommandType.StoredProcedure
          };
  
          dbTarget.Parameters.Add(new DatabaseParameterInfo(&quot;@browser&quot;, &quot;${aspnet-request-useragent}&quot;));
          dbTarget.Parameters.Add(new DatabaseParameterInfo(&quot;@ip_address&quot;, &quot;${aspnet-request-ip}&quot;));
          dbTarget.Parameters.Add(new DatabaseParameterInfo(&quot;@url&quot;, &quot;${aspnet-request-url}&quot;));
          dbTarget.Parameters.Add(new DatabaseParameterInfo(&quot;@message&quot;, &quot;${message}&quot;));
          dbTarget.Parameters.Add(new DatabaseParameterInfo(&quot;@level&quot;, &quot;${level}&quot;));
          dbTarget.Parameters.Add(new DatabaseParameterInfo(&quot;@stack_trace&quot;, &quot;${stacktrace:format=DetailedFlat}&quot;));
          dbTarget.Parameters.Add(new DatabaseParameterInfo(&quot;@exception&quot;, &quot;${exception:format=tostring}&quot;));
          dbTarget.Parameters.Add(new DatabaseParameterInfo(&quot;@logger&quot;, &quot;${logger}&quot;));
       
  
  
          config.AddTarget(&quot;database&quot;, dbTarget);
          config.LoggingRules.Add(new LoggingRule(&quot;*&quot;, ConfigHelper.CommonLogLevel, dbTarget));
  
          InternalLogger.LogFile = @&quot;D:\logs\internal\&quot; + ConfigHelper.InternalLogFile;
          InternalLogger.LogLevel = ConfigHelper.InternalLogLevel;
          InternalLogger.IncludeTimestamp = true;           
         
  
          LogManager.ThrowConfigExceptions = ConfigHelper.ThrowNlogConfigExceptions;
          LogManager.ThrowExceptions = ConfigHelper.ThrowNlogExceptions;
          LogManager.Configuration = config;
  </code></pre>
  <p>In a controller Action:
  ....</p>
  <pre><code>try
  {
     //...attempt stuff
  }
  catch(Exception ex)
  {
     var CommonLogger = LogManager.GetCurrentClassLogger();
     CommonLogger.Error(ex);
  }
  </code></pre>
  <p>....</p>
  <p>Trace output from the internal log:</p>
  <pre><code>2022-07-06 15:11:32.6517 Trace FindReachableObject&lt;NLog.Internal.IRenderable&gt;:
  2022-07-06 15:11:32.6517 Trace Scanning SimpleLayout ' =&gt; '
  2022-07-06 15:11:32.6517 Trace  Scanning Property LayoutRenderers 'NLog.LayoutRenderers.LayoutRenderer[]' System.Collections.Generic
  2022-07-06 15:11:32.6517 Trace  Scanning LiteralLayoutRenderer 'Layout Renderer: ${literal}'
  2022-07-06 15:11:32.7450 Trace DatabaseTarget(Name=database): Open connection.
  2022-07-06 15:11:32.7450 Trace DatabaseTarget(Name=database): Executing StoredProcedure: sp_insert_log
  2022-07-06 15:11:32.7520 Trace   DatabaseTarget: Parameter: **'@browser' = ''** (String)
  2022-07-06 15:11:32.7520 Trace   DatabaseTarget: Parameter: **'@ip_address' = ''** (String)
  2022-07-06 15:11:32.7520 Trace   DatabaseTarget: Parameter: **'@url' = ''** (String)
  2022-07-06 15:11:32.7520 Trace   DatabaseTarget: Parameter: '@message' = 'System.Exception: Extended data test' (String)
  2022-07-06 15:11:32.7520 Trace   DatabaseTarget: Parameter: '@level' = 'Error' (String)
  2022-07-06 15:11:32.7520 Trace FindReachableObject&lt;NLog.Internal.IRenderable&gt;:
  2022-07-06 15:11:32.7520 Trace Scanning SimpleLayout ' =&gt; '
  2022-07-06 15:11:32.7520 Trace  Scanning Property LayoutRenderers 'NLog.LayoutRenderers.LayoutRenderer[]' System.Collections.Generic
  2022-07-06 15:11:32.7520 Trace  Scanning LiteralLayoutRenderer 'Layout Renderer: ${literal}'
  2022-07-06 15:11:32.7520 Trace   DatabaseTarget: Parameter: '@stack_trace' = '[System.Object Execute(System.Web.Mvc.ControllerBase, System.Object[])] =&gt; [System.Object lambda_method(System.Runtime.CompilerServices.Closure, System.Web.Mvc.ControllerBase, System.Object[])] =&gt; [System.Web.Mvc.ActionResult Login(MyApp.Application.DTO.UserLoginDTO)]' (String)
  2022-07-06 15:11:32.7520 Trace   DatabaseTarget: Parameter: '@exception' = 'System.Exception: Extended data test
     at MyApp.Web.Controllers.LoginController.Login(UserLoginDTO dto) in MyApp\MyApp.Web\Controllers\LoginController.cs:line 31' (String)
  2022-07-06 15:11:32.7520 Trace   DatabaseTarget: Parameter: '@logger' = 'MyApp.Web.Controllers.BaseController' (String)
  2022-07-06 15:11:32.7520 Trace   DatabaseTarget: Parameter: '@extended_data' = '' (String)
  2022-07-06 15:11:32.8397 Trace DatabaseTarget(Name=database): Finished execution, result = 1
  2022-07-06 15:11:32.8397 Trace DatabaseTarget(Name=database): Close connection (KeepConnection = false).
  </code></pre>
  <p>Database Results:
  <a href="https://i.stack.imgur.com/mRi2Z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mRi2Z.png" alt="Aspnet request variables empty" /></a></p>
  <p>Any thoughts on what I could be doing wrong?</p>