How to register Autofac component per http request in web.config?
问题 In MVC3 application I have my custom implementation of IPrincipal. I want to register it in web.config and then inject it to constructors by Autofac. Autofac XML-configuration has attribute "instance-scope" but it does not support "per-http-request". Any ideas how can I register component per http scope in web.config? I already tried different combinations of per-dependency, single-instance or per-lifetime-scope with ownership external but results are very buggy. 回答1: As Nicholas Blumhardt