Пример #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            if (!env.IsDevelopment())
            {
                app.UseHsts();
            }

            // Culture
            CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("de-DE");

            // DB setup
            app.UpdateGrowDatabase();

            // Setup MVC pipeline
            app.UseLoggingExceptionHandler();
            app.UseExceptionHandler("/Error");
            app.UseStatusCodePagesWithRedirects("/ErrorCode?code={0}");
            app.UseHttpsRedirection();
            app.UseStaticFiles();
            app.UseGrowAuthentication();
            app.UseMvc(RouteConfig.GetGrowRoutes());
        }