public void Configure(IApplicationBuilder app, IServiceProvider serviceProvider) { if (Environment.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Home/Error"); } app.UseAuthentication(); app.UseSocket(); app.UseStaticFiles(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=TestSession}/{action=List}/{id?}"); }); RoleInitializer.CreateUsersRoles(serviceProvider).GetAwaiter().GetResult(); }