Starting with version 3.1.0, the Microsoft.FeatureManagement library allows running feature management services, including feature filters, as scoped services in dependency injection-based .NET applications. To take advantage of this feature, you can simply replace the AddFeatureManagement call in your code with AddScopedFeatureManagement, as shown in the following code snippet:
services.AddScopedFeatureManagement();
Feature filters can evaluate a feature flag based on the properties of an HTTP Request. This is usually performed by inspecting the HttpContext through the singleton IHttpContextAccessor pattern. However, this pattern doesn't work for Blazor server applications where scoped services should be used instead. In this case, AddScopedFeatureManagement method should be used.