private void InitializeWeb() { if (Config.IsInitialized) { // Increase the timeout on the rare chance the cache needs to be initialized from scratch using (TimeoutExtender extender = TimeoutExtender.NewMinutes(30)) { new ControllersInitializer().Initialize(); new ElementsInitializer().Initialize(); new ProjectionsInitializer().Initialize(); new PartsInitializer().Initialize(); } } }
public void Initialize() { if (new AutoBackupChecker().AutoBackupDue()) { // Extend the timeout to ensure there is no timeout error using (TimeoutExtender extender = TimeoutExtender.NewMinutes(60)) { try { LaunchBackup(); } catch (Exception ex) { LogWriter.Error(new Exception("An error occurred during the automatic backup.", ex)); } } } }