Exemplo n.º 1
0
        public static void Configure(HttpApplication application)
        {
            XmlConfigurator.Configure();

            DbRegistry.Configure();

            ConfigureWebApi();

            if (ConfigurationManager.AppSettings["resources.from-db"] == "true")
            {
                AssemblyWork.UploadResourceData(AppDomain.CurrentDomain.GetAssemblies());
                AppDomain.CurrentDomain.AssemblyLoad += (sender, args) => AssemblyWork.UploadResourceData(AppDomain.CurrentDomain.GetAssemblies());
            }

            AjaxSecurityChecker.Instance.CheckMethodPermissions += AjaxCheckMethodPermissions;

            try
            {
                AmiPublicDnsSyncService.Synchronize();
            }
            catch { }

            NotifyConfiguration.Configure();

            WebItemManager.Instance.LoadItems();

            SearchHandlerManager.Registry(new StudioSearchHandler());

            StorageFactory.InitializeHttpHandlers();
            (new S3UploadGuard()).DeleteExpiredUploads(TimeSpan.FromDays(1));

            BundleConfig.Configure();
        }
Exemplo n.º 2
0
 private void Application_StartDelayed(object sender, EventArgs e)
 {
     XmlConfigurator.Configure();
     DbRegistry.Configure();
     InitializeDbResources();
     AjaxSecurityChecker.Instance.CheckMethodPermissions += AjaxCheckMethodPermissions;
     try
     {
         AmiPublicDnsSyncService.Synchronize();
     }
     catch { }
     NotifyConfiguration.Configure();
     WebItemManager.Instance.LoadItems();
     SearchHandlerManager.Registry(new StudioSearchHandler());
     (new S3UploadGuard()).DeleteExpiredUploads(TimeSpan.FromDays(1));
     BundleConfig.Configure();
 }
Exemplo n.º 3
0
        public static void Configure()
        {
            XmlConfigurator.Configure();

            DbRegistry.Configure();

            PrepareRedisSessionProvider();

            if (HttpContext.Current != null && HttpContext.Current.Request != null)
            {
                var url = HttpContext.Current.Request.GetUrlRewriter();
                CommonLinkUtility.Initialize(new UriBuilder(url.Scheme, url.Host, url.Port).Uri.ToString());
            }

            ConfigureWebApi();

            if (ConfigurationManager.AppSettings["resources.from-db"] == "true")
            {
                DBResourceManager.PatchAssemblies();
            }

            AjaxSecurityChecker.Instance.CheckMethodPermissions += AjaxCheckMethodPermissions;

            try
            {
                AmiPublicDnsSyncService.Synchronize();
            }
            catch { }

            NotifyConfiguration.Configure();

            WebItemManager.Instance.LoadItems();

            SearchHandlerManager.Registry(new StudioSearchHandler());

            StorageFactory.InitializeHttpHandlers();
            (new S3UploadGuard()).DeleteExpiredUploads(TimeSpan.FromDays(1));

            BundleConfig.Configure();

            if (CoreContext.Configuration.Standalone)
            {
                WarmUp.Instance.Start();
            }
        }