protected void Application_Start() { AutofacMvcConfig.ConfigureBuilder(); AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); }
protected void Application_Start() { var container = AutofacMvcConfig.RegisterAll( typeof(MvcApplication).Assembly, Directory.GetFiles(Server.MapPath("~/bin"), "SmartHub.*.dll").Select(x => Assembly.LoadFrom(x)).ToArray() ); AutofacConfig.Register(container); GlobalConfiguration.Configuration.UseAutofacActivator(container); AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); SecurityConfig.RegisterProtocol(); }