Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Blazor HttpClient service Error on page reload

$
0
0

I have an api https://localhost:7293/ everything works fine however consuming the api using httpclient on blazor wasm or blazor app wasm or auto render is a nightmare works on load but crashes on reload.

Tried swapping HttpClient on all kind of ways still got the errors.

builder.Services.AddHttpClient<IDashboardService, DashboardService>(         api => api.BaseAddress = new Uri("https://localhost:7293/"));

or

builder.Services.AddHttpClient();

or

builder.Services.AddScoped(       sp => new HttpClient { BaseAddress = new Uri("https://localhost:7293/") });

Note: This is in dotnet 8 Version="8.0.6"


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>