IfeatureCollection has been disposed errors

I have encountered this error when I stay on a blazor page for a few minutes then I make an ApiAsync request. I had it happen on a new app I am working on as well as the basic blazor app from start.servicestack.net. It usually happens after 5-6 minutes. This occurs on a dotnet 8 and 9 solution

I have yet another Blazor app on dotnet 8 with SS 8.4 and this has never been an issue.

fail: ServiceStack.DtoUtils[0]
      IFeatureCollection has been disposed.
      Object name: 'Collection'.
      System.ObjectDisposedException: IFeatureCollection has been disposed.
      Object name: 'Collection'.
         at Microsoft.AspNetCore.Http.Features.FeatureReferences`1.ThrowContextDisposed()
         at Microsoft.AspNetCore.Http.DefaultHttpRequest.get_Path()
         at ServiceStack.Host.NetCore.NetCoreRequest..ctor(HttpContext context, String operationName, RequestAttributes attrs, String pathInfo) in /home/runner/work/ServiceStack/ServiceStack/ServiceStack/src/ServiceStack/Host/NetCore/NetCoreRequest.cs:line 49
         at ServiceStack.NetCoreAppHostExtensions.ToRequest(HttpContext httpContext, String operationName) in /home/runner/work/ServiceStack/ServiceStack/ServiceStack/src/ServiceStack/AppHostBase.NetCore.cs:line 883
         at ServiceStack.IdentityClientFactory.GetGateway() in /home/runner/work/ServiceStack/ServiceStack/ServiceStack/src/ServiceStack.Extensions/BlazorExtensions.cs:line 72
         at ServiceStack.Blazor.BlazorComponentBase.get_Gateway() in /home/runner/work/ServiceStack/ServiceStack/ServiceStack.Blazor/src/ServiceStack.Blazor/BlazorComponentBase.cs:line 15
         at ServiceStack.Blazor.BlazorComponentBase.ApiAsync[TResponse](IReturn`1 request) in /home/runner/work/ServiceStack/ServiceStack/ServiceStack.Blazor/src/ServiceStack.Blazor/BlazorComponentBase.cs:line 20
         at ServiceStack.Blazor.Components.Tailwind.AutoQueryGrid`1.OnParametersSetAsync() in /home/runner/work/ServiceStack/ServiceStack/ServiceStack.Blazor/src/ServiceStack.Blazor/Components/Tailwind/AutoQueryGrid.razor.cs:line 430
         at ServiceStack.Blazor.Components.Tailwind.AutoQueryGrid`1.<HandleLocationChanged>b__330_0() in /home/runner/work/ServiceStack/ServiceStack/ServiceStack.Blazor/src/ServiceStack.Blazor/Components/Tailwind/AutoQueryGrid.razor.cs:line 474

I also notice after this error occurs on reload I have to login again.

It means that the underlying Request Context that the Gateway Request is trying to use is no longer available, e.g. the blazor server circuit has been terminated, nothing we can really do about that.

You can try something like regularly pinging the server to keep the connection alive.