From 033c85fc4bbb2224bf33eb01d787c88ee612ebb1 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Thu, 1 Feb 2024 16:49:29 -0500 Subject: [PATCH] add support for Razor Pages --- Oqtane.Server/Startup.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Oqtane.Server/Startup.cs b/Oqtane.Server/Startup.cs index eb625a52..fcd22e8b 100644 --- a/Oqtane.Server/Startup.cs +++ b/Oqtane.Server/Startup.cs @@ -144,6 +144,8 @@ namespace Oqtane .AddOqtaneApplicationParts() // register any Controllers from custom modules .ConfigureOqtaneMvc(); // any additional configuration from IStartup classes + services.AddRazorPages(); + services.AddRazorComponents() .AddInteractiveServerComponents(options => { @@ -209,11 +211,6 @@ namespace Oqtane app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/" + Constants.Version + "/swagger.json", Constants.PackageId + " " + Constants.Version); }); } - app.UseEndpoints(endpoints => - { - endpoints.MapControllers(); - }); - app.UseEndpoints(endpoints => { endpoints.MapRazorComponents() @@ -224,6 +221,8 @@ namespace Oqtane // simulate the fallback routing approach of traditional Blazor - allowing the custom SiteRouter to handle all routing concerns app.UseEndpoints(endpoints => { + endpoints.MapControllers(); + endpoints.MapRazorPages(); endpoints.MapFallback(); });