예제 #1
0
        protected void Application_Start()
        {
            //-----------------------
            Logger.Logger4Net.Info(String.Format("START --- {0} ---", "Application_Start"));
            //-----------------------

            try { AreaRegistration.RegisterAllAreas(); }
            catch (Exception ex) { Global.Cache.ExceptionSet(Guid.NewGuid().ToString(), ex); }
            //
            try { GlobalConfiguration.Configure(WebApiConfig.Register); }
            catch (Exception ex) { Global.Cache.ExceptionSet(Guid.NewGuid().ToString(), ex); }
            //
            try { RouteConfig.RegisterRoutes(RouteTable.Routes); }
            catch (Exception ex) { Global.Cache.ExceptionSet(Guid.NewGuid().ToString(), ex); }
            //
            try { FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); }
            catch (Exception ex) { Global.Cache.ExceptionSet(Guid.NewGuid().ToString(), ex); }
            //
            try { BundleConfig.RegisterBundles(BundleTable.Bundles); }
            catch (Exception ex) { Global.Cache.ExceptionSet(Guid.NewGuid().ToString(), ex); }
            //
            try { Mapper.Mapper.Init(); }
            catch (Exception ex) { Global.Cache.ExceptionSet(Guid.NewGuid().ToString(), ex); }
            // Load Configuration
            try { ConfigFile.CreateOrLoad(Path.Combine(HostingEnvironment.MapPath("~"), "Exodus.config")); }
            catch (Exception ex) { Global.Cache.ExceptionSet(Guid.NewGuid().ToString(), ex); }
            // Load localisation
            try { Global.Localisation.Init(); }
            catch (Exception ex) { Global.Cache.ExceptionSet(Guid.NewGuid().ToString(), ex); }
            //
            try  { Global.Cache.Init(); }
            catch (Exception ex) { Global.Cache.ExceptionSet(Guid.NewGuid().ToString(), ex); }
            //-----------------------
            Logger.Logger4Net.Info(String.Format("END --- {0} ---", "Application_Start"));
        }