protected void Application_Start() { DockerDatabaseInitializer.Initialize(); AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); }
static void Main(string[] args) { DockerDatabaseInitializer.Initialize(); GlobalConfiguration.Configuration.UseSqlServerStorage(ConfigurationManager.ConnectionStrings["DockerConnection"].ConnectionString); //Limit to 1 job a time for better test var backgroundServerOptions = new BackgroundJobServerOptions() { WorkerCount = 1 }; using (var server = new BackgroundJobServer(backgroundServerOptions)) { Console.WriteLine("Hangfire Server started. Press any key to exit..."); Thread.Sleep(Timeout.Infinite); } }