title: Parameterless constructor error. (upgrade to autofac 3)
body: <p>In <code>application_start()</code> I have the following code.
  When the Account Controller get's created I get the parameterless constructor error.
  AccountController does not have a parameterless constructor. It seems that autofac is no longer configured?</p>
  
  <p>Account Controller Expects the following.</p>
  
  <p><code>public AccountController(IFlexMembershipProvider membership, IFlexOAuthProvider openAuth)</code></p>
  
  <p>I am not sure why autofac is not injecting the dependences?</p>
  
  <pre><code>var builder = new ContainerBuilder();
  
  builder.RegisterType&lt;DataContext&gt;()
      .As&lt;IRepository&gt;()
      .As&lt;DbContext&gt;().InstancePerLifetimeScope();
  
  builder.RegisterType&lt;FlexMembershipProvider&gt;().As&lt;IFlexMembershipProvider&gt;();
  builder.RegisterType&lt;FlexMembershipProvider&gt;().As&lt;IFlexOAuthProvider&gt;();
  builder.RegisterType&lt;FlexRoleProvider&gt;().As&lt;IFlexRoleProvider&gt;();
  
  builder.RegisterType&lt;UserStorage&gt;().As&lt;IFlexUserStore&gt;().InstancePerLifetimeScope();
  builder.RegisterType&lt;RoleStorage&gt;().As&lt;IFlexRoleStore&gt;().InstancePerLifetimeScope();
  builder.RegisterType&lt;DefaultSecurityEncoder&gt;().As&lt;ISecurityEncoder&gt;().SingleInstance();
  builder.RegisterType&lt;AspnetEnvironment&gt;().As&lt;IApplicationEnvironment&gt;();
  builder.RegisterType&lt;InvestorService&gt;().As&lt;IInvestorService&gt;();
  builder.RegisterType&lt;InvestmentService&gt;().As&lt;IInvestmentService&gt;();
  builder.RegisterType&lt;BrokerService&gt;().As&lt;IBrokerService&gt;().As&lt;IListService&lt;Broker&gt;&gt;();
  builder.RegisterType&lt;PortfolioManagerService&gt;().As&lt;IListService&lt;PortfolioManager&gt;&gt;();
  
  builder.RegisterModelBinderProvider();
  
  var container = builder.Build();
  
  DependencyResolver.SetResolver(new AutofacDependencyResolver(container));
  </code></pre>