Last active
September 3, 2023 20:33
-
-
Save dj-nitehawk/171a4228be267ca9312e1ae882ee6d5b to your computer and use it in GitHub Desktop.
Middleware order for Blazor Serverside
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FastEndpoints; | |
using FastEndpoints.Swagger; | |
var bld = WebApplication.CreateBuilder(args); | |
bld.Services.AddFastEndpoints(); | |
bld.Services.AddRazorPages(); | |
bld.Services.AddServerSideBlazor(); | |
bld.Services.SwaggerDocument(); | |
var app = bld.Build(); | |
app.UseStaticFiles(); | |
app.UseAuthorization(); | |
app.UseFastEndpoints(); | |
app.UseSwaggerGen(); | |
app.MapBlazorHub(); | |
app.MapFallbackToPage("/_Host"); | |
app.Run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, it worked. I tried version 5.16 yesterday, it didn't work. Trying with 5.17 is positive. Thanks