Пример #1
0
        protected void Application_Start()
        {
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            AppDomain.CurrentDomain.AssemblyLoad += CurrentDomain_AssemblyLoad;

            // new CreateDatabaseIfNotExists<DomainDrivenDesign.CoreEcommerce.Ef.CoreEcommerceDbContext>().InitializeDatabase(new DomainDrivenDesign.CoreEcommerce.Ef.CoreEcommerceDbContext());

            MemoryMessageBuss.AutoRegister();

            DomainDrivenDesign.Core.EngineeCurrentContext.Init();

            EngineePermission.Init();

            EngineeEcommerce.Init();

            EngineeEmailSender.Init();

            EngineeCommandWorkerQueue.Init();

            UnhandleExceptionLogs.Log("INIT-DONE-NON-ERROR");
        }
Пример #2
0
        void Application_Error(object sender, EventArgs e)
        {
            Exception ex = Server.GetLastError();

            if (ex != null)
            {
                var errMsg = ex.GetMessages();

                UnhandleExceptionLogs.Log(errMsg);
                Server.ClearError();
            }
        }
Пример #3
0
        private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            if (e != null)
            {
                if (e.ExceptionObject != null)
                {
                    var ex = e.ExceptionObject as Exception;
                    if (ex != null)
                    {
                        var errMsg = ex.GetMessages();

                        UnhandleExceptionLogs.Log(errMsg);
                    }
                }
            }
        }