// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, UserManager <AppUser> userManager, RoleManager <AppRole> roleManager) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseRouting(); app.UseStaticFiles(); IdentitySeed.IdentityAdd(userManager, roleManager).Wait(); app.UseAuthentication(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllerRoute( name: "areas", pattern: "{Area}/{Controller=Home}/{Action=Index}/{id?}" ); endpoints.MapControllerRoute( name: "default", pattern: "{Controller=Home}/{Action=Index}/{id?}" ); }); }