Esempio n. 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)
        {
            app.UseCors("TelerikReportingDemoPolicy");

            app.UseRequestLocalization();

            app.UseAuthentication();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                app.UseBrowserLink();
            }
            else
            {
                app.UseExceptionHandler("/Home/Error");
            }

            app.UseKendo(env);

            app.UseStaticFiles();

            app.UseSession();

            HttpHelper.Configure(app.ApplicationServices.GetRequiredService <IHttpContextAccessor>());

            SettingConfig.InitilizeSettings();

            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Home}/{action=Index}/{id?}");
            });
        }