// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env) { app.UseDeveloperExceptionPage(); app.UseStaticFiles(); app.UseAuthentication(); app.UseMvc(routes => { routes.MapRoute( name: "", template: "Student/{action}", defaults: new { controller = "Student", action = "Index", area = "Student" } ); routes.MapRoute( name: "", template: "Faculty/Manage/{courseCode}", defaults: new { controller = "Course", action = "Manage", area = "Faculty" } ); routes.MapRoute( name: "", template: "Faculty/Edit/{courseCode}", defaults: new { controller = "Course", action = "Edit", area = "Faculty" } ); routes.MapRoute( name: "", template: "Faculty/{action}", defaults: new { controller = "Course", action = "Index", area = "Faculty" } ); routes.MapRoute( name: "", template: "Register", defaults: new { area = "Admin", controller = "Account", action = "Create" } ); routes.MapRoute( name: "", template: "Account/{action=List}", defaults: new { area = "Admin", controller = "Account" } ); routes.MapRoute( name: "Login", template: "Login", defaults: new { area = "Admin", controller = "Account", action = "Login" } ); routes.MapRoute( name: "Logout", template: "Logout", defaults: new { area = "Admin", controller = "Account", action = "Logout" } ); routes.MapRoute( name: "AccessDenied", template: "AccessDenied", defaults: new { area = "Admin", controller = "Account", action = "AccessDenied" } ); routes.MapRoute( name: "CreateAccount", template: "Account/Create", defaults: new { area = "Admin", controller = "Account", action = "Create" } ); routes.MapRoute( name: "default", template: "{controller=Course}/{action=Index}", defaults: new { area = "Faculty" } ); }); SeedData.Populate(app); IdentitySeedData.Populate(app); }