title: Net core 3.1 - IUrlHelper constructed with IActionContextAccessor outside of controller returns empty Link
body: <p>Consider following:</p>
  <pre><code>public class MailDispatcher : IMailDispatcher
  {
          private readonly IUrlHelperFactory _urlHelperFactory;
          private readonly IActionContextAccessor _actionContextAccessor;
  
          public MailDispatcher(IUrlHelperFactory urlHelperFactory,
                     IActionContextAccessor actionContextAccessor)
          {
              _urlHelperFactory = urlHelperFactory;
              _actionContextAccessor = actionContextAccessor;
          }
  
  
          private string GetLink(int id)
          {
              var urlHelper = _urlHelperFactory.GetUrlHelper(_actionContextAccessor.ActionContext);
              return urlHelper.Link(&quot;Display&quot;, new { id = id });
          }
      }
  }
  </code></pre>
  <p>Both <code>_urlHelperFactory</code> and <code>_actionContextAccessor</code> are not null after being injected.
  Additionally, <code>_actionContextAccessor.ActionContext</code> carries all necessary details like host, port, protocol, etc.</p>
  <p>Somehow, <code>urlHelper.Link(&quot;Display&quot;, new { id = id })</code> returns an empty string, and when queried in Immediate wnd returns:</p>
  <pre><code>urlHelper.Link(&quot;Display&quot;, new { id = id })
  The expression cannot be evaluated.  A common cause of this error is attempting to pass a lambda into a delegate.
  </code></pre>
  <p>I'd expect <code>[protocol]://[host]:[port]/[Controller]/Display/[id]</code></p>
  <p>If that matters, the <code>Display</code> action is declared as:</p>
  <pre><code>[HttpGet(&quot;{id:int}&quot;)]
  public IActionResult Display(int id)
  {
     ...
  }
  </code></pre>
  <p>Can you tell why the expected link is not being returned?</p>