I have created a Blazor Web Assembly project that has two projects: one server-side and one client-side. However, in .NET 8 and 9, it is not possible to access the resources of the server-side project through client components.
I tried to define HttpClient in Program.cs on both client and server projectsbut in the server project, I can't get the address of site
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });The server project can not find the HostEnvironment.BaseAddress
How I can resolve this problem?