protected void Application_Start()
        {
            var environment = Environment.GetEnvironmentVariable("APP_ENVIRONMENT") ?? "development";

            AreaRegistration.RegisterAllAreas();
            GlobalFilters.Filters.Add(new ExceptionLoggerFilter());

            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            ApplicationConfig.RegisterConfig(environment);
            LoggingConfig.Enable();
            DbInterception.Add(new SchoolInterceptorTransientErrors());
            DbInterception.Add(new SchoolInterceptorLogging());

            // Checking DNS resolution of the connections string
            var host = "contosso-2016-pcfdemo.database.windows.net";

            Logger.Instance.Information($"Checking the DNS Entry for the host at - {host}");

            // application is displaying a yellow screen here.
            // "No such host is known"
            var addresses = Dns.GetHostAddresses(host);

            foreach (var ipAddress in addresses)
            {
                Logger.Instance.Information($"Address - {ipAddress}");
            }
        }
        protected void Application_Start()
        {
            LoggingConfig.RegisterLogger();

            var logger = LoggingConfig.GetLoggerForContext(typeof(MvcApplication));

            logger.Information("-----");
            logger.Information("Starting application");

            logger.Information("Registering areas");
            AreaRegistration.RegisterAllAreas();

            logger.Information("Registering Filters");
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);

            logger.Information("Registering routes");
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            logger.Information("Registering Bundles");
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            logger.Information("Registering DbInterceptors");
            DbInterception.Add(new SchoolInterceptorTransientErrors());
            DbInterception.Add(new SchoolInterceptorLogging());
        }