The code shown here works in an ASP.NET Core 8.0 Blazor server-side project, but it is not working in a Blazor Web App built with "Interactive render mode: Server" and "Interactivity location: Global" (The app will not start with the base address selected, which should be https://localhost:7122/Identity/Account/Login?ReturnUrl=%2F ).I read this article on Microsoft documents but I hope I don't have to go that route and that there is a simpler solution cause my projects are all server side only.
program.cs builder.Services .AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7122/") });