title: .net core 2.2 get action and controller name in logging middleware without ControllerContext
body: <p>I am writing a middleware in .net core 2.2. I want to get name of Action and Controller name in the middleware.<br/>
  I can not use <code>ControllerContext</code> because it not available at that time.<br/>
  Here is solution in core 3.1 <a href="https://stackoverflow.com/questions/45920870/read-controller-and-action-name-in-middleware-net-core">Read Controller and Action name in middleware .Net Core</a></p>
  <pre><code>    public async Task Invoke(HttpContext context)
      {
          await LogRequest(context);
          await LogResponse(context);
      }
  
      private async Task LogResponse(HttpContext context)
      {
            ServiceName = context ...
      }
  </code></pre>