title: Cancel Long operation from Angular to .NET Core
body: <p>I try to send a cancellation request (on c# AspNetCore based on Abp Boilerplate) from Angular client (use Observable -&gt; unsubscribe...) to cancel long Task Operation but API not fire.</p>
  <pre class="lang-cs prettyprint-override"><code>    [HttpPost]
          public async Task&lt;GetDataOutputDto&gt; GetDataLongOperation(CustomInputDto input)
          {
              try
              {
                  var tokenSource = new CancellationTokenSource(); // _httpContextAccessor.HttpContext.RequestAborted;
                  tokenSource.CancelAfter(2500);
  
                  var token = _httpContextAccessor.HttpContext.RequestAborted; //tokenSource.Token;
  
                  var settings = new JsonSerializerSettings
                  {
                      Error = (sender, args) =&gt; {
                          args.ErrorContext.Handled = true;
                      },
                      MissingMemberHandling = MissingMemberHandling.Ignore
                  };
  
  
                  //... remove for brev
          }
  </code></pre>
  <p>on angular side</p>
  <pre class="lang-js prettyprint-override"><code>                this.subscription = this.loadData(undefined).subscribe(res=&gt;{
                      console.log('data loaded!');
                      this.localData = res.data;
                      //this._rawData = this.localData;
                      this.loadItems();
                      
                  });
  
                  setTimeout(() =&gt; {
                      console.log('TEST stop long') 
                      this.subscription.unsubscribe();
                  }, 2500);
  </code></pre>
  <p>I test that if I use TaskSource with CancelAfter all code behind work well but from web (client side) I can't fire the cancellation operation</p>