NLog does not write to file in Asp.net Core
<p>I am using NLog in my Asp.net Core Application, but NLog is not able to write in file, i have all ready change permission of file,but still facing proble. file gets created,on first time but unable to write log in that file.</p>

<p>Here is my nlog.config file code below:</p>

<pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      autoReload="true"
      internalLogLevel="Warn"
      internalLogFile="C:\git\damienbod\AspNetCoreNlog\Logs\internal-nlog.txt"&gt;

    &lt;targets&gt;
      &lt;target xsi:type="File" name="allfile" fileName="D:\nlog-all.txt"
                  layout="${longdate}|${event-properties:item=EventId.Id}|${logger}|${uppercase:${level}}|${message} ${exception}"
                  keepFileOpen="false"/&gt;
      &lt;target xsi:type="EventLog"
          name="String"
          layout="Layout"
          machineName="String"
          source="Layout"
          category="Layout"
          eventId="Layout"
          log="String"
          maxMessageLength="Integer" /&gt;
    &lt;/targets&gt;

    &lt;rules&gt;
      &lt;!--All logs, including from Microsoft--&gt;
      &lt;logger name="*" minlevel="*Info*" maxLevel="*Deubg*" writeTo="allfile" /&gt;
    &lt;/rules&gt;
  &lt;/nlog&gt;
</code></pre>

<p>And here is code of my controller</p>

<pre><code>NLog.Logger _Logger= LogManager.GetCurrentClassLogger();
            _Logger.Info("Hello i m executing");
</code></pre>