protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); DbConfig.RegisterDatabase(); BundleConfig.RegisterBundles(BundleTable.Bundles); BootstrapBundleConfig.RegisterBundles(); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BootstrapBundleConfig.RegisterBundles(); }
protected override void OnApplicationStarted() { base.OnApplicationStarted(); AreaRegistration.RegisterAllAreas(); FluentSecurityConfig.Configure(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BootstrapBundleConfig.RegisterBundles(BundleTable.Bundles); ExampleLayoutsRouteConfig.RegisterRoutes(RouteTable.Routes); AutoMapperConfiguration.Configure(); }
protected void Application_Start() { // Register the default hubs route: ~/signalr/hubs RouteTable.Routes.MapHubs(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); BootstrapBundleConfig.RegisterBundles(); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BootstrapBundleConfig.RegisterBundles(BundleTable.Bundles); BundleTable.EnableOptimizations = false; Database.SetInitializer <PRSContext>(new PRSInitializer()); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BootstrapBundleConfig.RegisterBundles(); var container = new Container(); container.Options.DefaultScopedLifestyle = new WebRequestLifestyle(); container.RegisterSingleton <ILinqToLdapLogger>(new SimpleTextLogger()); container.RegisterSingleton <ILdapConfiguration>(() => { var config = new LdapConfiguration() .MaxPageSizeIs(50) .LogTo(container.GetInstance <ILinqToLdapLogger>()); //Note the optional parameters available on AddMapping. //We can perform "late" mapping on certain values, //even for auto and attribute based mapping. config.AddMapping(new OrganizationalUnitMap()) .AddMapping(new AttributeClassMap <User>()); // I explicitly mapped User, but I can also let it // get mapped the first time we query for users. // This only applies to auto and attribute-based mapping. config.ConfigurePooledFactory("directory.utexas.edu") .AuthenticateBy(AuthType.Anonymous) .MinPoolSizeIs(0) .MaxPoolSizeIs(5) .UsePort(389) .ProtocolVersion(3); return(config); }); //simple context per request only when requested container.Register <IDirectoryContext>(() => container.GetInstance <ILdapConfiguration>().CreateContext(), Lifestyle.Scoped); container.RegisterWebApiControllers(GlobalConfiguration.Configuration); container.RegisterMvcControllers(Assembly.GetExecutingAssembly()); GlobalConfiguration.Configuration.DependencyResolver = new SimpleInjectorWebApiDependencyResolver(container); DependencyResolver.SetResolver(new SimpleInjectorDependencyResolver(container)); container.Verify(); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); BootstrapBundleConfig.RegisterBundles(); AuthConfig.RegisterAuth(); DeveloperController.InitiateAccounts(); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BootstrapBundleConfig.RegisterBundles(System.Web.Optimization.BundleTable.Bundles); //InitializeRavenProfiler(); //TryCreatingIndexesOrRedirectToErrorPage(); //RavenDbUtils.TryCreatingFacets(DocumentStoreHolder.DocumentStore); }
protected void Application_Start() { AutofacConfig.ConfigureContainer(); // AreaRegistration.RegisterAllAreas(); // WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); BootstrapBundleConfig.RegisterBundles(BundleTable.Bundles); AuthConfig.RegisterAuth(); // Database.SetInitializer(new DBInitializer()); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); BootstrapBundleConfig.RegisterBundles(BundleTable.Bundles); // Configure Model Bindings System.Web.Mvc.ModelBinders.Binders.Add(typeof(Guid), new CompanyABC.WebUI.ModelBinders.GuidModelBinder()); // Configure dependency injection container DependencyResolver.SetResolver(new NinjectDependencyResolver()); }
protected void Application_Start() { var builder = new ContainerBuilder(); ModelMetadataProviders.Current = new AmplaModelMetadataProvider(); ConfigurationData configData = ConfigurationData.Default; if (configData.ConnectToAmpla) { builder.RegisterModule <AmplaWebServiceModule>(); SecurityWebServiceFactory.Factory = () => new SecurityWebServiceClient("BasicHttpBinding_ISecurityWebService"); DataWebServiceFactory.Factory = () => new DataWebServiceClient("NetTcpBinding_IDataWebService"); } else { builder.RegisterModule <SimpleWebServiceModule>(); } builder.RegisterModule <AmplaDataAccessModule>(); builder.RegisterModule(new ControllerInjectionModule(typeof(ControllerInjectionModule).Assembly)); builder.RegisterModule(new ControllerInjectionModule(typeof(MvcApplication).Assembly)); builder.RegisterModule <AmplaSecurityInjectionModule>(); //builder.RegisterModule(new SimpleSecurityInjectionModule("User", "password")); var container = builder.Build(); DependencyResolver.SetResolver(new AutofacDependencyResolver(container)); AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BootstrapBundleConfig.RegisterBundles(System.Web.Optimization.BundleTable.Bundles); NavigationRouteConfig.RegisterRoutes(RouteTable.Routes); }
protected void Application_Start() { ModelBinders.Binders.DefaultBinder = new KnockoutModelBinder(); AreaRegistration.RegisterAllAreas(); BootstrapBundleConfig.RegisterBundles(); ValueProviderFactories.Factories.Add(new JsonValueProviderFactory()); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); System.Data.Entity.Database.SetInitializer(new DatabaseInitializer()); IUnityContainer container = Bootstrapper.Initialise(); // todo TaskManager.Initialize(new CleanupRegistry(container.Resolve <ICleanupTask>())); // TaskManager.Initialize(new UsersMonitorRegistry(container.Resolve<IUsersMonitorTask>())); // TaskManager.Initialize(new SearchCacheRegistry(container.Resolve<ISearchCacheTask>())); }