asp.net mvc 5.1 - Unable to inject ActionFilter instance using AutoFac -


What do where no one can tell me that I'm wrong. I have an action ...

  [UserValidation ( "standard")] public ActionResult Index ()  

custom attribute with the custom filter feature as ...

defined
  find public square UserValidationAttribute: FilterAttribute, IAutofacActionFilter {public ILogger logger {; Set; } Private string _states; Public Ughrwaligeshnattiviti (String status) {// the code at this point, "Lkdhud 'zero _status = status; } Public void OnActionExecuting (HttpActionContext actionContext) {} public void OnActionExecuted (HttpActionExecutedContext actionExecutedContext) {}}  

I'm building as ...

AutoFac container
  var Builder = New Containerbuilder (); Builder.RegisterControllers (Assembly.GetExecutingAssembly ()); Builder. Registration (x => New logger (.) As & lt; ILogger & gt; () .instancePerHttpRequest (); Builder RegistrationFilter Provider (); var Container = Builder.Build (); System.web.mvc Dependency Resolver For any reason when the creator of the custom action filter is 'hit', the public 'logger' property is zero  

and the new AutofacDependencyResolver (container) p> would appreciate any help.

Thank you


Comments