title: NavigationManager.NavigateTo in razor pages c# sometimes don't work
body: <p>i've a very simple question about asp.net core and razor pages.</p>
  
  <p>Inside c# razor code I want to redirect to another route in certain cases. 
  If there's an async (awaiting) webservice call before, NavigationManager.NavigateTo doesn't work correctly, but no exception is thrown either.</p>
  
  <pre><code>async Task Cancel()
  {
      var authState = await authenticationStateTask;
      var user = authState.User;
      if (user.Identity.IsAuthenticated){           
         // if there's some async webservice call action here, 
         // NavigationManager.NavigateTo does neither work nor an exception is thrown
         NavigationManager.NavigateTo("/Project", true);
      }
  }
  </code></pre>
  
  <p>Do you have any idea what could be the cause?</p>
  
  <p>What are the alternatives to <em>NavigationManager.NavigateTo</em>?</p>
  
  <p>P.S. Please don't propose <em>Response.Redirect</em> in that way (because, that's not suitable for me).</p>
  
  <pre><code>var context = new Microsoft.AspNetCore.Http.HttpContextAccessor();
  context.HttpContext.Response.Redirect("/Project", true)
  </code></pre>
  
  
  
  <p>Kind regards,
  -he.</p>