Esempio n. 1
0
 protected void Application_Start()
 {
     ObjectMapping.Init();
     if (!ZooKeeperHelper.Exists(ZooKeeperHelper.ZooKeeperRootNode))
     {
         ZooKeeperHelper.Create(ZooKeeperHelper.ZooKeeperRootNode, null);
     }
     new AppHost().Init();
 }
Esempio n. 2
0
 // 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();
 }
Esempio n. 3
0
 public Startup(IConfiguration configuration)
 {
     ObjectMapping.Init();
     ConfigurationManager.Configuration = configuration;
     Configuration = configuration;
 }
Esempio n. 4
0
 protected void Application_Start()
 {
     ObjectMapping.Init();
     AreaRegistration.RegisterAllAreas();
     RouteConfig.RegisterRoutes(RouteTable.Routes);
 }
Esempio n. 5
0
 protected void Application_Start()
 {
     ObjectMapping.Init();
     new AppHost().Init();
 }