Fix 404 on _framework assets in production deploy
Blazor framework assets (blazor.web.js) under _framework are served via the static-asset endpoints manifest, not physical wwwroot files. Plain UseStaticFiles only serves physical files, so published deployments returned 404 for blazor.web.js (worked in dev via the dev-time static web assets provider). Switch to MapStaticAssets, which reads the endpoints manifest shipped with publish. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -207,7 +207,7 @@ if (!app.Environment.IsDevelopment())
|
||||
// Re-execute unmatched (404) requests into the branded not-found page
|
||||
app.UseStatusCodePagesWithReExecute("/not-found");
|
||||
|
||||
app.UseStaticFiles();
|
||||
app.MapStaticAssets();
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
app.UseAntiforgery();
|
||||
|
||||
Reference in New Issue
Block a user