Merge pull request #11553 from isaac2004/10935-work
Remove Razor Pages specific things from the MVC (Model-View-Controller) template #10935
This commit is contained in:
commit
57a344d90e
|
|
@ -119,7 +119,9 @@ namespace Company.WebApplication1
|
||||||
#else
|
#else
|
||||||
services.AddControllersWithViews();
|
services.AddControllersWithViews();
|
||||||
#endif
|
#endif
|
||||||
services.AddRazorPages();
|
#if (OrganizationalAuth || IndividualAuth)
|
||||||
|
services.AddRazorPages();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||||
|
|
@ -139,11 +141,9 @@ namespace Company.WebApplication1
|
||||||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
||||||
app.UseHsts();
|
app.UseHsts();
|
||||||
}
|
}
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
#else
|
#else
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
|
|
||||||
|
|
@ -159,7 +159,9 @@ namespace Company.WebApplication1
|
||||||
endpoints.MapControllerRoute(
|
endpoints.MapControllerRoute(
|
||||||
name: "default",
|
name: "default",
|
||||||
pattern: "{controller=Home}/{action=Index}/{id?}");
|
pattern: "{controller=Home}/{action=Index}/{id?}");
|
||||||
|
#if (OrganizationalAuth || IndividualAuth)
|
||||||
endpoints.MapRazorPages();
|
endpoints.MapRazorPages();
|
||||||
|
#endif
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue