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, IWebHostEnvironment env /*, ILoggerFactory loggerFactory*/)
        {
            // Set exception handling early in pipeline
            if (env.Equals("Development"))
            {
                //app.UseDeveloperExceptionPage();
                app.UseBrowserLink();
            }
            //else
            //{
            //}

            //// NLog XML configuration file
            //env.ConfigureNLog("nlog.config");

            // NLog config variables
            //LogManager.Configuration.Variables["connectionString"] = Configuration.GetSection("ConnectionStrings").Get<ConnectionStrings>().SetupData_NLog;
            //LogManager.Configuration.Variables["configDir"] = $"C:\\Temp\\Logs";

            // Added to enable access to TempData
            app.UseSession();

            app.UseStaticFiles();

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