title: ASP.NET Core : Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true instead
body: <p>ASP.NET core server, <code>AllowSynchronousIO</code> is set to <code>false</code></p>
  <pre><code>        new WebHostBuilder()
          .UseKestrel(options =&gt;
          {
              options.AllowSynchronousIO = false;
          })
  </code></pre>
  <p>In the action, it outputs a JsonResult</p>
  <pre><code>    public async Task&lt;IActionResult&gt; SanityCheck()
      {
          Dictionary&lt;string, string&gt; dic = await GetDic();
  
          return this.Json(dic);
      }
  </code></pre>
  <p>And it ends with an exception</p>
  <blockquote>
  <p>System.InvalidOperationException: Synchronous operations are
  disallowed. Call WriteAsync or set AllowSynchronousIO to true instead.</p>
  </blockquote>
  <p>Can't I return a JsonResult with <code>AllowSynchronousIO=false</code> ?</p>