Beispiel #1
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            RegisterGlobalFilters(GlobalFilters.Filters);
            RegisterRoutes(RouteTable.Routes);

            Logger logger = CreateLogger();
            try
            {
                var app = new Application(logger);
                app.Initialize();

                Codaxy.Dox.Viewer.Application.RegisterApplication(app);

                logger.Info("Application started.");
            }
            catch (Exception ex)
            {
                logger.Exception("Application start error!", ex);
                ThreadPool.QueueUserWorkItem(s =>
                {
                    Thread.Sleep(3000);
                    HttpRuntime.UnloadAppDomain();
                });
                throw;
            }
        }