From 84d08ade22f7dded422edb7f2208821392e10a62 Mon Sep 17 00:00:00 2001 From: Archangel Date: Thu, 16 Oct 2025 10:47:56 +0200 Subject: [PATCH] Initialize MVC before Blazor --- Libraries/SPTarkov.Server.Web/SPTWeb.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Libraries/SPTarkov.Server.Web/SPTWeb.cs b/Libraries/SPTarkov.Server.Web/SPTWeb.cs index c4c11bc3..d1dff139 100644 --- a/Libraries/SPTarkov.Server.Web/SPTWeb.cs +++ b/Libraries/SPTarkov.Server.Web/SPTWeb.cs @@ -17,7 +17,6 @@ public static class SPTWeb builder.WebHost.UseStaticWebAssets(); builder.Services.AddMudServices(); - builder.Services.AddRazorComponents().AddInteractiveServerComponents(); var mvcBuilder = builder.Services.AddControllers(); @@ -25,6 +24,8 @@ public static class SPTWeb { mvcBuilder.AddApplicationPart(assembly); } + + builder.Services.AddRazorComponents().AddInteractiveServerComponents(); } public static void UseSptBlazor(this WebApplication app) @@ -33,6 +34,7 @@ public static class SPTWeb app.UseAntiforgery(); app.UseStaticFiles(); + app.MapControllers(); var razorBuilder = app.MapRazorComponents().AddInteractiveServerRenderMode(); @@ -67,7 +69,5 @@ public static class SPTWeb ); } } - - app.MapControllers(); } }