Custom ASP.NET Core Middleware with cancellation Token
<p>I have a custom ASP.NET Core middleware and I want to retrieve the cancellation token for the request.</p>
<p>I tried to add it to the signature of the invoke like this:</p>
<pre class="lang-cs prettyprint-override"><code>public async Task Invoke(HttpContext context,CancellationToken token)
</code></pre>
<p>But as soon as I add it, it isn't called any more.</p>
<p>What am I doing wrong?</p>