Пример #1
0
 protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
 {
     if (LogViewerInternalHelper.AllConfigsPresent())
     {
         //Umbraco DB
         if (LogViewerInternalHelper.UseUmbracoDb())
         {
             CreateNewTables();
         }
         else
         {
             //External DB
             var logDbIsValid = LogViewerInternalHelper.DbConnectionIsValid("LogDbDSN");
             if (logDbIsValid)
             {
                 CreateNewTables();
             }
             else
             {
                 var msgDb =
                     $"Dragonfly.UmbracoLogViewer is unable to connect to the 'LogDbDSN' Database. Please check your web.config and your network connectivity.";
                 LogHelper.Error <LogViewerStartup>(msgDb, null);
             }
         }
     }
 }