Exemplo n.º 1
0
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, IDatabaseInitialiser databaseInitialiser)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                databaseInitialiser.Initialise();
            }

            app.UseMvc();
        }
Exemplo n.º 2
0
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, UserManager <IdentityUser> userManager, IDatabaseInitialiser databaseInitialiser)
        {
            app.UseHsts();

            databaseInitialiser.Initialise(app, env);
            app.UseMiddleware <AppInsightsRequestTrackingMiddleware>();

            app.UseIdentityServer();
            app.UseHttpsRedirection();
            app.UseAuthentication();
            app.UseStaticFiles();
            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Account}/{action=Login}/{id?}");
            });
        }