- 
                Notifications
    
You must be signed in to change notification settings  - Fork 4
 
Closed
Labels
Description
Describe the Bug
How can I add attribute filtering to controllers in in a Net 8 Mvc Project? Based on the documentation, controllers need to be configured as service in order to for them to be to be resolved by Autofac. I'm unable to find any hooks into this registration pipeline for attribute filtering as this registration happens with the service collection.
Steps to Reproduce
Create a Net8 Mvc Project and register the controllers as services using the following configuration.
public void ConfigureServices(IServiceCollection services)
{
      services.AddControllersWithViews(o => { /* global filters and auth could be added here */})
              .AddControllersAsServices();
}Expected Behavior
I should be able to apply attribute filtering, using WithAttributeFiltering(), to these controllers.
Exception with Stack Trace
N/A
Dependency Versions
Autofac: 7.1.0
Autofac.Extensions.DependencyInjection: 8.0.0.0
Autofac.Extras.AttributeMetadata: 6.0.0.0