protected void Application_Start() { ObjectMapping.Init(); if (!ZooKeeperHelper.Exists(ZooKeeperHelper.ZooKeeperRootNode)) { ZooKeeperHelper.Create(ZooKeeperHelper.ZooKeeperRootNode, null); } new AppHost().Init(); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { ObjectMapping.Init(); services.AddSession(options => { // Set a short timeout for easy testing. options.IdleTimeout = TimeSpan.FromHours(2); options.Cookie.HttpOnly = true; // Make the session cookie essential options.Cookie.IsEssential = true; }); services.AddCustomeHttpContextAccessor(); services.AddControllersWithViews(); }
public Startup(IConfiguration configuration) { ObjectMapping.Init(); ConfigurationManager.Configuration = configuration; Configuration = configuration; }
protected void Application_Start() { ObjectMapping.Init(); AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); }
protected void Application_Start() { ObjectMapping.Init(); new AppHost().Init(); }