コード例 #1
0
        protected void Application_Start()
        {
            log4net.Config.XmlConfigurator.Configure();
            AreaRegistration.RegisterAllAreas();
            RegisterRoutes(RouteTable.Routes);

            var iisversion = GetIISVersion();

            if (iisversion != 0 && iisversion < 7)
            {
                AddMimeMapping(".png", "image/png");
                AddMimeMapping(".svg", "image/svg+xml");
            }

            DbRegistry.Configure();

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

            //HACK: Register CRM and Projects file integrations
            if (!FilesIntegration.IsRegisteredFileSecurityProvider("projects", "project"))
            {
                FilesIntegration.RegisterFileSecurityProvider("projects", "project", new ASC.Projects.Engine.SecurityAdapterProvider());
            }

            if (!FilesIntegration.IsRegisteredFileSecurityProvider("crm", "crm_common"))
            {
                FilesIntegration.RegisterFileSecurityProvider("crm", "crm_common", new ASC.CRM.Core.FileSecurityProvider());
            }
        }
コード例 #2
0
ファイル: Startup.cs プロジェクト: yulifengwx/CommunityServer
        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();
        }
コード例 #3
0
 private void InitializeDbResources()
 {
     if (ConfigurationManager.AppSettings["resources.from-db"] == "true")
     {
         AssemblyWork.UploadResourceData(AppDomain.CurrentDomain.GetAssemblies());
         AppDomain.CurrentDomain.AssemblyLoad += (sender, args) => AssemblyWork.UploadResourceData(AppDomain.CurrentDomain.GetAssemblies());
     }
 }
コード例 #4
0
 private void InitializeDbResources()
 {
     if (ConfigurationManager.AppSettings["resources.from-db"] == "true")
     {
         AssemblyWork.UploadResourceData(AppDomain.CurrentDomain.GetAssemblies());
         XmlPatternProvider.CreateResourceManager = (key, assembly) => new DBResourceManager(key.Substring(key.LastIndexOf('.') + 1) + ".resx", new ResourceManager(key, assembly));
         AppDomain.CurrentDomain.AssemblyLoad    += (sender, args) => AssemblyWork.UploadResourceData(AppDomain.CurrentDomain.GetAssemblies());
     }
 }
コード例 #5
0
        private static void InitializeDbResources()
        {
            if (!Settings.ResourcesFromDataBase)
            {
                return;
            }

            AssemblyWork.UploadResourceData(AppDomain.CurrentDomain.GetAssemblies());
            AppDomain.CurrentDomain.AssemblyLoad += (s, a) => AssemblyWork.UploadResourceData(AppDomain.CurrentDomain.GetAssemblies());
        }
コード例 #6
0
 private void InitializeDbResources()
 {
     AssemblyWork.UploadResourceData(AppDomain.CurrentDomain.GetAssemblies());
     AppDomain.CurrentDomain.AssemblyLoad += (sender, args) => AssemblyWork.UploadResourceData(AppDomain.CurrentDomain.GetAssemblies());
 }