diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs index 915e26d1b1..928cdac151 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs @@ -120,7 +120,10 @@ namespace Company.WebApplication1 #else services.AddControllersWithViews(); #endif + +#if (OrganizationalAuth || IndividualAuth) services.AddRazorPages(); +#endif } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. @@ -160,7 +163,10 @@ namespace Company.WebApplication1 endpoints.MapControllerRoute( name: "default", pattern: "{controller=Home}/{action=Index}/{id?}"); + +#if (OrganizationalAuth || IndividualAuth) endpoints.MapRazorPages(); +#endif }); } }